From 7b671adf869b0982de7dc95b35c549bfded4aafa Mon Sep 17 00:00:00 2001 From: Adam Cecile Date: Wed, 3 Jul 2019 10:53:52 +0200 Subject: [PATCH] Update hpacucli packaging --- packaging/debian/hpacucli/changelog | 6 ++++++ packaging/debian/hpacucli/control | 2 +- packaging/debian/hpacucli/rules | 12 +++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packaging/debian/hpacucli/changelog b/packaging/debian/hpacucli/changelog index 6d695c0..88dc491 100644 --- a/packaging/debian/hpacucli/changelog +++ b/packaging/debian/hpacucli/changelog @@ -1,3 +1,9 @@ +hpacucli (9.20.9.0-2) unstable; urgency=medium + + * Use lsb-release to generate unique distribution tag in pkgs version. + + -- Adam Cecile Wed, 03 Jul 2019 10:50:48 +0200 + hpacucli (9.20.9.0-1) unstable; urgency=low * New upstream release (Closes: #225). diff --git a/packaging/debian/hpacucli/control b/packaging/debian/hpacucli/control index d8a7398..f0be86f 100644 --- a/packaging/debian/hpacucli/control +++ b/packaging/debian/hpacucli/control @@ -2,7 +2,7 @@ Source: hpacucli Section: non-free/admin Priority: optional Maintainer: Adam Cécile (Le_Vert) -Build-Depends: debhelper (>= 5), sharutils +Build-Depends: debhelper (>= 5), sharutils, lsb-release Standards-Version: 3.9.3 Package: hpacucli diff --git a/packaging/debian/hpacucli/rules b/packaging/debian/hpacucli/rules index ce383f5..f6be0e0 100755 --- a/packaging/debian/hpacucli/rules +++ b/packaging/debian/hpacucli/rules @@ -6,6 +6,16 @@ DESTDIR = $(CURDIR)/debian/hpacucli DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) +# Get version from changelog as well as lsb_release +# to compute unique build version (useful for repo mirroring systems doing file pooling) +PKG_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f2 -d' ') +DIST_NAME := $(shell lsb_release -si) +DIST_RELEASE := $(shell lsb_release -sc) +DIST_VERSION := $(shell lsb_release -sr) +PKG_VERSION_TAG := $(PKG_VERSION)+$(DIST_NAME).$(DIST_RELEASE).$(DIST_VERSION) +SUBSTVARS_BINARY_VERSION := -Vbinary:Version="$(PKG_VERSION_TAG)" +SUBSTVARS_SOURCE_VERSION := -Vsource:Version="$(PKG_VERSION_TAG)" + build: build-arch build-indep build-arch: build-indep: @@ -54,7 +64,7 @@ binary-arch: build install dh_fixperms dh_installdeb dh_shlibdeps -l$(DESTDIR)/usr/lib/hpacucli/ - dh_gencontrol + dh_gencontrol -- -v"$(PKG_VERSION_TAG)" $(SUBSTVARS_BINARY_VERSION) $(SUBSTVARS_SOURCE_VERSION) dh_md5sums dh_builddeb