packaging: distinguish clean and build steps from install in Debian stable
authorDenis Laxalde <denis.laxalde@logilab.fr>
Wed, 23 Oct 2019 16:35:27 +0200
branchstable
changeset 43318 cdf6db1f4faf
parent 43317 4caf88845082
child 43319 11c85873e106
packaging: distinguish clean and build steps from install in Debian
contrib/packaging/debian/rules
--- a/contrib/packaging/debian/rules	Wed Oct 23 16:25:41 2019 +0200
+++ b/contrib/packaging/debian/rules	Wed Oct 23 16:35:27 2019 +0200
@@ -17,13 +17,21 @@
 	dh_python3 --shebang=/usr/bin/python3
 	find debian/mercurial/usr/share -type d -empty -delete
 
+override_dh_auto_clean:
+	$(MAKE) cleanbutpackages
+	$(MAKE) -C contrib/chg clean
+
+override_dh_auto_build:
+	$(MAKE) all
+	$(MAKE) -C contrib/chg all
+
 override_dh_install:
 	python3 setup.py install --root "$(CURDIR)"/debian/mercurial --install-layout=deb
 	# chg
 	make -C contrib/chg \
 		DESTDIR="$(CURDIR)"/debian/mercurial \
 		PREFIX=/usr \
-		clean install
+		install
 	# remove arch-independent python stuff
 	find "$(CURDIR)"/debian/mercurial/usr/lib \
 		! -name '*.so' ! -type d -delete , \