Patchwork [2,of,4,STABLE] packaging: distinguish clean and build steps from install in Debian

login
register
mail settings
Submitter Denis Laxalde
Date Oct. 23, 2019, 3:22 p.m.
Message ID <cdf6db1f4faf64e99c5b.1571844140@steppe.local>
Download mbox | patch
Permalink /patch/42538/
State Accepted
Headers show

Comments

Denis Laxalde - Oct. 23, 2019, 3:22 p.m.
# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1571841327 -7200
#      Wed Oct 23 16:35:27 2019 +0200
# Branch stable
# Node ID cdf6db1f4faf64e99c5bef725459e8da0f3c6f04
# Parent  4caf88845082d6c4d7b02d668182b507aa59a9bd
packaging: distinguish clean and build steps from install in Debian

Patch

diff --git a/contrib/packaging/debian/rules b/contrib/packaging/debian/rules
index 177d0f9..934f15e 100755
--- a/contrib/packaging/debian/rules
+++ b/contrib/packaging/debian/rules
@@ -17,13 +17,21 @@  override_dh_python3:
 	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 , \