#!/usr/bin/make -f
#
# uncomment the next line for verbose mode
#export DH_VERBOSE=1

%:
	dh $@ --with python2

override_dh_clean:
	python$(PYVERS) setup.py clean --all --component remotefilelog,githelp,backups,absorb,morestatus,nointerrupt,sigtrace,chistedit

override_dh_auto_install:
	python$(PYVERS) setup.py install --root $(CURDIR)/debian/remotefilelog --install-layout=deb --component remotefilelog,githelp,backups,absorb,morestatus,nointerrupt,sigtrace,chistedit
	find $(CURDIR)/debian/remotefilelog -name '*.egg-info' -delete
	# Explicitly remove the hgext3rd/__init__.py file from the place where we're
	# staging the files for build.  Mercurial provides
	# <python>/dist-packages/hgext3rd/__init__.py normally, we do not want to
	# conflict.
	find $(CURDIR)/debian/remotefilelog -wholename '*/hgext3rd/__init__.py' -delete
