summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-21 17:08:44 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-21 17:09:45 +0200
commitaa00b338b372b8af2b10220527fe24d946b97c07 (patch)
tree877a81abe9be49a979a6182daffc3d250b05cb67 /debian
parenteb664792c612bd91ee891d7867093f6d244bd0ac (diff)
downloadinstallation-guide-aa00b338b372b8af2b10220527fe24d946b97c07.zip
rules: Leverage /usr/share/dpkg/pkg-info.mk to provide package information
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog2
-rwxr-xr-xdebian/rules13
2 files changed, 8 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog
index e5aaa2e3c..319dcba4b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,8 @@ installation-guide (20220213) UNRELEASED; urgency=medium
[ Samuel Thibault ]
* Document changed behaviour for choice selection via arrow keys in text
frontend.
+ * rules: Leverage /usr/share/dpkg/pkg-info.mk to provide package
+ information.
[ Debian Janitor ]
* Trim trailing whitespace.
diff --git a/debian/rules b/debian/rules
index 042fa0104..3f8111ea6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,12 +1,11 @@
#!/usr/bin/make -f
+include /usr/share/dpkg/pkg-info.mk
ARCHS=$(shell cd debian; ./getfromlist archlist)
LANGS=$(shell cd debian; ./getfromlist langlist)
-VERSION=$(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
-DATE=$(shell echo $(VERSION) | cut -d '.' -f 1)
-SUITE=$(shell LC_ALL=C dpkg-parsechangelog | grep ^Distribution: | cut -d ' ' -f 2)
-ifeq (${SUITE},unstable)
-SUITE=bookworm
+DATE=$(shell echo $(DEB_VERSION) | cut -d '.' -f 1)
+ifeq ($(DEB_DISTRIBUTION),unstable)
+DEB_DISTRIBUTION=bookworm
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
@@ -62,7 +61,7 @@ build-stamp:
-rm -rf $(MANTMP)
set -e && cd build && \
MAKEFLAGS="$(PARALLEL)" \
- official_build=1 manual_release=$(SUITE) \
+ official_build=1 manual_release=$(DEB_DISTRIBUTION) \
architectures="$(ARCHS)" languages="$(LANGS)" \
destination=$(MANTMP)/'$${arch}' noarchdir=1 \
./build.sh
@@ -94,7 +93,7 @@ binary-indep: install doc-base
# Note: these should be uploaded manually
#set -e && cd $(MANTMP) && \
# for arch in $(ARCHS) ; do \
- # tarname=di-manual-$${arch}_$(VERSION).tar.gz ; \
+ # tarname=di-manual-$${arch}_$(DEB_VERSION).tar.gz ; \
# cd $$arch ; \
# tar czf ../../../../$$tarname . ; \
# cd .. ; \