From 8742d3f9015f9aa280c78081028e9028f683ea38 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Tue, 17 May 2022 15:13:06 +0200 Subject: rules: simplify thanks to debhelper compat 13 When dh-sequence-foo is listed in build-depends, debhelper automatically inserts dh_foo in the commands. override_dh_auto_test is not invoked anymore if DEB_BUILD_OPTIONS contains nocheck. execute_after_dh_* is available and more readable than override_dh_*. Move chmod to execute_after_dh_fixperms for clarity. Examples are not compressed anymore. --- debian/control | 1 + debian/rules | 22 ++++++---------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/debian/control b/debian/control index ab89dc58..0997139e 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ Build-Depends: bash-completion (>= 1:2.1-4.2~), debhelper-compat (= 13), dh-python, + dh-sequence-bash-completion, dh-sequence-python3, docbook2x, flake8, diff --git a/debian/rules b/debian/rules index c49d2c2e..381be217 100755 --- a/debian/rules +++ b/debian/rules @@ -11,30 +11,20 @@ DEB_COMPRESS_EXCLUDE=$(EXAMPLE_SCRIPTS) PYCHECKER_ARGS=-boptparse --no-override --no-shadowbuiltin + %: - dh $@ --with python3 --buildsystem=pybuild + dh $@ --buildsystem=pybuild override_dh_auto_test: -ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) make -else - @echo "Checks disabled via DEB_BUILD_OPTIONS" -endif -override_dh_auto_build: - dh_auto_build +execute_after_dh_auto_build: make docs -override_dh_auto_install: - dh_auto_install - dh_bash-completion - chmod a+x debian/tmp/usr/lib/python3.*/dist-packages/gbp/scripts/supercommand.py +execute_after_dh_fixperms: + chmod a+x debian/git-buildpackage/usr/lib/python3/dist-packages/gbp/scripts/supercommand.py -override_dh_auto_clean: - dh_auto_clean +execute_after_dh_auto_clean: rm -rf build/ make -C docs/ clean -rm gbp/version.py - -override_dh_compress: - dh_compress --exclude=usr/share/doc/git-buildpackage/examples/ -- cgit v1.2.3