Update tw-cli packaging

This commit is contained in:
Adam Cecile 2019-07-02 20:53:28 +02:00
parent a30b89f27d
commit d7b16205a5
3 changed files with 19 additions and 2 deletions

View File

@ -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 <acecile@le-vert.net> 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.

View File

@ -2,7 +2,7 @@ Source: tw-cli
Section: admin
Priority: optional
Maintainer: Adam Cécile (Le_Vert) <gandalf@le-vert.net>
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

View File

@ -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