diff --git a/packaging/debian/tw-cli/changelog b/packaging/debian/tw-cli/changelog index 0a59f8d..4e2f939 100644 --- a/packaging/debian/tw-cli/changelog +++ b/packaging/debian/tw-cli/changelog @@ -1,3 +1,9 @@ +tw-cli (2:2.00.11.020+10.2.1-2) unstable; urgency=medium + + * Use lsb-release to generate unique distribution tag for pkgs version. + + -- Adam Cecile Tue, 02 Jul 2019 20:50:00 +0200 + tw-cli (2:2.00.11.020+10.2.1-1) unstable; urgency=low * New upstream release. diff --git a/packaging/debian/tw-cli/control b/packaging/debian/tw-cli/control index fe81717..deff766 100644 --- a/packaging/debian/tw-cli/control +++ b/packaging/debian/tw-cli/control @@ -2,7 +2,7 @@ Source: tw-cli Section: 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.2 Homepage: http://www.lsi.com/channel/support/products/Pages/3wareSAS9750-8e.aspx diff --git a/packaging/debian/tw-cli/rules b/packaging/debian/tw-cli/rules index 1913cf4..486a872 100755 --- a/packaging/debian/tw-cli/rules +++ b/packaging/debian/tw-cli/rules @@ -6,6 +6,16 @@ DESTDIR=$(CURDIR)/debian/tw-cli/usr 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: @@ -50,9 +60,10 @@ binary-arch: build install dh_strip dh_compress dh_fixperms + dh_makeshlibs dh_installdeb dh_shlibdeps - dh_gencontrol + dh_gencontrol -- -v"$(PKG_VERSION_TAG)" $(SUBSTVARS_BINARY_VERSION) $(SUBSTVARS_SOURCE_VERSION) dh_md5sums dh_builddeb