From a5bee84e116f8bc6a01556868010873ea7276140 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sat, 11 Jun 2022 12:55:26 -0500 Subject: [PATCH] debian/rules: rely on dpkg pkg-info.mk for src_name and debian_ver --- debian/rules | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/debian/rules b/debian/rules index 8bdc50cc8a3..53b02a0474e 100755 --- a/debian/rules +++ b/debian/rules @@ -15,6 +15,8 @@ # Debhelper support added via one of Joey Hess' example files. # See the debian/changelog for further historical information. +include /usr/share/dpkg/pkg-info.mk + # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 @@ -51,13 +53,9 @@ runtime_ver := $(shell $(pf); echo $(upstream_ver) | perl -pe 's/[a-z]+$$//o') major_ver := $(shell $(pf); echo $(runtime_ver) | perl -pe 's/\..*$$//o') minor_ver := $(shell $(pf); echo $(runtime_ver) | perl -pe 's/^[^.]*\.//o') -# The name of the Debian source package -src_name := $(shell $(pf); dpkg-parsechangelog | egrep '^Source:') -src_name := $(shell $(pf); echo $(src_name) | perl -pe 's/Source:\s+//o') - -# The version from the changelog (i.e. 20.5-1) -debian_ver := $(shell $(pf); dpkg-parsechangelog | egrep '^Version:') -debian_ver := $(shell $(pf); echo $(debian_ver) | perl -pe 's/Version:\s+//o') +# From /usr/share/dpkg/pkg-info.mk +src_name := $(DEB_SOURCE) +debian_ver := $(DEB_VERSION) # The Debian revision (i.e. the 1 from 20.5-1) # Always everything after the last '-' -- 2.30.2