From aa00b338b372b8af2b10220527fe24d946b97c07 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 21 Aug 2022 17:08:44 +0200 Subject: rules: Leverage /usr/share/dpkg/pkg-info.mk to provide package information --- debian/changelog | 2 ++ debian/rules | 13 ++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'debian') 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 .. ; \ -- cgit v1.2.3