From 38abed12aeb01c1375d46b4336661f91c8586bf0 Mon Sep 17 00:00:00 2001 From: Adam Cecile Date: Wed, 3 Jul 2019 00:05:11 +0200 Subject: [PATCH] Update megacli packaging --- packaging/debian/megacli/changelog | 7 +++++++ packaging/debian/megacli/control | 2 +- packaging/debian/megacli/rules | 12 +++++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packaging/debian/megacli/changelog b/packaging/debian/megacli/changelog index cc5bc1a..f6644b9 100644 --- a/packaging/debian/megacli/changelog +++ b/packaging/debian/megacli/changelog @@ -1,3 +1,10 @@ +megacli (8.07.14-2) unstable; urgency=medium + + * Use lsb-release to generate unique distribution tag in pkgs version. + * Add libncurses5 as build dependency so shlibsdeps find proper dep. + + -- Adam Cecile Tue, 02 Jul 2019 23:58:31 +0200 + megacli (8.07.14-1) unstable; urgency=medium * New upstream release. diff --git a/packaging/debian/megacli/control b/packaging/debian/megacli/control index 1f12fb0..cb30fc2 100644 --- a/packaging/debian/megacli/control +++ b/packaging/debian/megacli/control @@ -2,7 +2,7 @@ Source: megacli Section: admin Priority: optional Maintainer: Adam Cécile (Le_Vert) -Build-Depends: debhelper (>= 5) +Build-Depends: debhelper (>= 5), libncurses5, lsb-release Standards-Version: 3.9.5 Homepage: http://www.lsi.com/support/Pages/Download-Results.aspx?keyword=megacli diff --git a/packaging/debian/megacli/rules b/packaging/debian/megacli/rules index ff6596c..7e5773b 100755 --- a/packaging/debian/megacli/rules +++ b/packaging/debian/megacli/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 build-arch: build-indep: @@ -40,7 +50,7 @@ binary-arch: build install dh_fixperms dh_installdeb dh_shlibdeps - dh_gencontrol + dh_gencontrol -- -v"$(PKG_VERSION_TAG)" $(SUBSTVARS_BINARY_VERSION) $(SUBSTVARS_SOURCE_VERSION) dh_md5sums dh_builddeb