]> www.infradead.org Git - pidgin-chime.git/commitdiff
Use make variables in debian/rules.maint
authorDavid Woodhouse <dwmw@amazon.co.uk>
Sun, 5 Sep 2021 11:28:33 +0000 (12:28 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Sun, 5 Sep 2021 11:28:33 +0000 (12:28 +0100)
This makes it easier to override them when doing an out-of-tree build
after 'make tmp-dist'.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
debian/rules.maint

index 912994aeb215d237a4743c5823c3eea87fc65941..e5bafee524c92ff1d02df4b9cdb8886b0f97097c 100644 (file)
@@ -2,7 +2,9 @@
 # git and lsb_release are required, and these rules must be run from within a git working copy
 
 
-export DISTRIB_CODENAME=$(shell lsb_release -cs)
+DISTRIB_CODENAME := $(shell lsb_release -cs)
+COMMITDESC := $(shell git describe --tags | sed  -e 's/$$/-0/' -e 's/v\([^-]\+-[^-]\+\)\(-g[0-9a-f-]\+\|\)/\1/')
+COMMITDATE := $(shell git show -s --format=%cD)
 
 ifeq ($(DISTRIB_CODENAME),)
        DISTRIB_CODENAME=$(error Unable to identify distribution)
@@ -16,16 +18,16 @@ else
        PKGVERSIONSUFFIX=~${DISTRIB_CODENAME}+1
 endif
 
+
+BUILDDEPS := $(shell grep -v '^\s*(\#|$$$$)' debian/deps/build-$(DISTRIB_CODENAME) | tr '\n' ' ')
+BINDEPS := $(shell egrep -v '^\s*(\#|$$$$)' debian/deps/bin-$(DISTRIB_CODENAME) | tr '\n' ' ')
+
 debian/control: debian/control.in debian/deps/build-$(DISTRIB_CODENAME) debian/deps/bin-$(DISTRIB_CODENAME)
-       @BUILDDEPS=$$(egrep -v '^\s*(#|$$$$)' debian/deps/build-$(DISTRIB_CODENAME) | tr '\n' ' '); \
-        BINDEPS=$$(egrep -v '^\s*(#|$$$$)' debian/deps/bin-$(DISTRIB_CODENAME) | tr '\n' ' '); \
-        sed -e "s/%BUILDDEPS%/$$BUILDDEPS/" -e "s/%BINDEPS%/$$BINDEPS/" $< > $@
+        sed -e "s/%BUILDDEPS%/$(BUILDDEPS)/" -e "s/%BINDEPS%/$(BINDEPS)/" $< > $@
 
 debian/changelog: debian/changelog.in debian/control
-       @COMMITDESC=$$(git describe --tags | sed  -e 's/$$/-0/' -e 's/v\([^-]\+-[^-]\+\)\(-g[0-9a-f-]\+\|\)/\1/') \
-        COMMITDATE=$$(git show -s --format=%cD) && \
-        sed -e "s/%COMMITDESC%/$$COMMITDESC${PKGVERSIONSUFFIX}/" -e "s/%COMMITDATE%/$$COMMITDATE/" \
-            -e "s/%DIST%/$$DISTRIB_CODENAME/" $< > $@
+        sed -e "s/%COMMITDESC%/$(COMMITDESC)${PKGVERSIONSUFFIX}/" -e "s/%COMMITDATE%/$(COMMITDATE)/" \
+            -e "s/%DIST%/$(DISTRIB_CODENAME)/" $< > $@
 
 CLEANFILES=debian/changelog debian/control