On 03 Feb 2018, Juhani Numminen wrote:
>Quick note regarding debian/rules (which I only read online).
>debhelper(7) manpage tells me that autoreconf is enabled by default
>since compat 10, which means that "--with autoreconf" is not needed

Thanks, this is now fixed by:


>Instead of doing version parsing the hard way, could you perhaps
>include /usr/share/dpkg/pkg-info.mk and use a suitable variable that
>it defines?

Indeed, but you also made me realize that the manpage was not being
re-generated, because the output (dh_bash-completion.1) was versioned
and not listed as a target dependency on debian/rules.

What do you think of the following change:

diff --git a/debian/extra/debhelper/dh_bash-completion.1 
deleted file mode 100644
index 82cde8b..0000000

diff --git a/debian/rules b/debian/rules
index 5ab9a19..8f7fb55 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 
@@ -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: dh_bash-completion.1
        for i in $(REMOVE); do \
            rm -vf 
debian/bash-completion/usr/share/bash-completion/completions/$$i; \


Reply via email to