diff --git a/packaging/debian/sas2ircu/changelog b/packaging/debian/sas2ircu/changelog index 27e2709..cb27ab8 100644 --- a/packaging/debian/sas2ircu/changelog +++ b/packaging/debian/sas2ircu/changelog @@ -1,3 +1,9 @@ +sas2ircu (16.00.00.00-2) unstable; urgency=medium + + * Use lsb-release to generate unique distribution tag in pkgs version. + + -- Adam Cecile Tue, 02 Jul 2019 23:28:42 +0200 + sas2ircu (16.00.00.00-1) unstable; urgency=low * New upstream release. diff --git a/packaging/debian/sas2ircu/control b/packaging/debian/sas2ircu/control index a74fd02..3b2326f 100644 --- a/packaging/debian/sas2ircu/control +++ b/packaging/debian/sas2ircu/control @@ -2,7 +2,7 @@ Source: sas2ircu Section: admin Priority: optional Maintainer: Adam Cécile (Le_Vert) -Build-Depends: debhelper (>= 5) +Build-Depends: debhelper (>= 5), lsb-release Standards-Version: 3.9.4 Package: sas2ircu diff --git a/packaging/debian/sas2ircu/rules b/packaging/debian/sas2ircu/rules index 1d7a1db..4114c93 100755 --- a/packaging/debian/sas2ircu/rules +++ b/packaging/debian/sas2ircu/rules @@ -5,6 +5,16 @@ 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: @@ -37,9 +47,10 @@ binary-arch: build install dh_installdocs dh_compress -Xusr/share/doc/sas2ircu/SAS2IRCU_User_Guide.pdf 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