summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gabriel@inconstante.eti.br>2018-02-05 23:41:33 -0200
committerGabriel F. T. Gomes <gabriel@inconstante.eti.br>2018-02-05 23:41:33 -0200
commit1bbccc5353cbe2bb85bc9f487a632cace01c8aa9 (patch)
tree0cff0216f53398f4d16873fa31978bfbd93da0d4 /debian/rules
parent10ec55ff1c54543320b012b466b9e48c7e8611de (diff)
downloadbash-completion-1bbccc5353cbe2bb85bc9f487a632cace01c8aa9.tar.gz
Always re-generate the manpage for dh_bash-completion
The manpage for dh_bash-completion is currently not re-generated during builds, because it is not listed as a dependency of any debian/rules target. Packaging only works because the output file is present in the repository. This patch removes the output file from the repository and adds it as a dependency of the dh_install target, so that the manpage gets re-generated during builds. This patch also replaces the manual parsing of the upstream version with the DEB_VERSION_UPSTREAM from /usr/share/dpkg/pkg-info.mk. Thanks to Juhani Numminen for suggesting this change [1]. [1] https://bugs.debian.org/877450#81
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules7
1 files changed, 4 insertions, 3 deletions
diff --git a/debian/rules b/debian/rules
index 5ab9a19e..8f7fb550 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,8 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-VERSION=$(shell parsechangelog | grep ^Version | awk -F": " '{print $$2}' | cut -d"-" -f1)
+include /usr/share/dpkg/pkg-info.mk
+
REMOVE=adb bts nmcli hwclock ionice mock modules mount rtcwake dmesg renice umount
override_dh_auto_configure:
@@ -23,10 +24,10 @@ override_dh_installchangelogs:
dh_bash-completion.1: debian/extra/debhelper/dh_bash-completion
pod2man \
--center "Bash-Completion Debhelper" \
- --release $(VERSION) \
+ --release $(DEB_VERSION_UPSTREAM) \
$< > debian/extra/debhelper/$@
-override_dh_install:
+override_dh_install: dh_bash-completion.1
dh_install
for i in $(REMOVE); do \
rm -vf debian/bash-completion/usr/share/bash-completion/completions/$$i; \