The following commit has been merged in the master branch:
commit 00815d8293fb53bf0a484129d5ff1186af1cf6f0
Author: Andreas Tille <ti...@debian.org>
Date:   Sat Aug 12 16:10:09 2017 +0200

    Do not parse changelog to get package metadata

diff --git a/debian/rules b/debian/rules
index 358164b..b4abb1f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,13 +1,11 @@
 #!/usr/bin/make -f
-# debian/rules for blends
-# This file is public domain software, originally written by Andreas Tille.
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-pkg := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
-VERSION := $(shell dpkg-parsechangelog -ldebian/changelog | grep Version: | 
cut -f2 -d' ' | cut -f1 -d- )
-DISTDIR := $(pkg)-$(VERSION)
+include /usr/share/dpkg/default.mk
+
+DISTDIR := $(DEB_SOURCE)-$(DEB_VERSION)
 
 %:
        dh $@
@@ -17,7 +15,7 @@ override_dh_auto_build:
        dh_auto_build
 
 override_dh_installchangelogs:
-       for pkgnews in $(pkg)-common $(pkg)-dev ; do \
+       for pkgnews in $(DEB_SOURCE)-common $(DEB_SOURCE)-dev ; do \
            cp -a debian/$$pkgnews.NEWS.Debian 
debian/$$pkgnews/usr/share/doc/$$pkgnews/NEWS.Debian ; \
        done
        dh_installchangelogs
@@ -36,7 +34,7 @@ get-orig-source:
            echo "File debian/changelog is missing. Something is wrong!" ; \
            exit -1 ; \
        fi
-       if [ "$(VERSION)" = "" ] ; then \
+       if [ "$(DEB_VERSION)" = "" ] ; then \
            echo "Unable to obtain version number from debian/changelog. 
Something is wrong!" ; \
            exit -1 ; \
        fi ;
@@ -47,5 +45,5 @@ get-orig-source:
        ln -sf sources.list.unstable $(DISTDIR)/sources.list
        # ln -s control.stub $(DISTDIR)/examples/debian/control
        rm -f `find . -name "*~"`
-       GZIP=-9 tar -czf ../$(pkg)_$(VERSION).tar.gz $(DISTDIR)
+       GZIP=-9 tar -czf ../$(DEB_SOURCE)_$(DEB_VERSION).tar.gz $(DISTDIR)
        rm -rf $(DISTDIR)

-- 
Git repository for blends code

_______________________________________________
Blends-commit mailing list
Blends-commit@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/blends-commit

Reply via email to