debian: Generate version from debian/changelog

This avoids patching the version file once per Debian upload.
Original version file is saved and restored.
(cherry picked from commit 2938a98bf4c4abe0426caee4555d889d655bc0df)
This commit is contained in:
David Bremner 2011-06-21 09:03:19 -03:00
parent 114eb1c520
commit 2b76283b52

7
debian/rules vendored
View file

@ -1,11 +1,18 @@
#!/usr/bin/make -f #!/usr/bin/make -f
VERSION=$(shell dpkg-parsechangelog | sed -n 's/^Version:\([^-]*\)/\1/p')
%: %:
dh $@ dh $@
override_dh_auto_configure: override_dh_auto_configure:
cp version debian/version.pre-build
echo $(VERSION) > version
dh_auto_configure -- --emacslispdir=/usr/share/emacs/site-lisp/notmuch dh_auto_configure -- --emacslispdir=/usr/share/emacs/site-lisp/notmuch
override_dh_auto_clean:
-mv debian/version.pre-build version
dh_auto_clean
override_dh_installdocs: override_dh_installdocs:
dh_installdocs dh_installdocs
install -m644 vim/README debian/notmuch/usr/share/doc/notmuch/README.vim install -m644 vim/README debian/notmuch/usr/share/doc/notmuch/README.vim