Use pre-defined version variables

svn path=/dists/trunk/linux-tools/; revision=22773
This commit is contained in:
Bastian Blank 2015-06-28 19:30:14 +00:00
parent ab2a55f5f2
commit 66fd690ba9
2 changed files with 5 additions and 12 deletions

9
debian/rules vendored
View File

@ -1,10 +1,7 @@
#!/usr/bin/make -f
SHELL := sh -e
SOURCE := $(shell dpkg-parsechangelog | sed -ne 's,^Source: *\(.*\)$$,\1,p')
VERSION_DEBIAN := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p')
VERSION := $(shell echo "$(VERSION_DEBIAN)" | sed -e 's,-[^-]*$$,,')
VERSION_DEBIAN_BINNMU := $(shell echo "$(VERSION_DEBIAN)" | sed -ne 's,.*\+b\(.*\)$$,\1,p')
VERSION_DEBIAN_BINNMU := $(shell echo "$(DEB_VERSION)" | sed -ne 's,.*\+b\(.*\)$$,\1,p')
include debian/rules.defs
@ -21,8 +18,8 @@ build-indep: debian/control
$(STAMPS_DIR):
@[ -d $@ ] || mkdir $@
DIR_ORIG = ../orig/$(SOURCE)-$(VERSION)
TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.xz
DIR_ORIG = ../orig/$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)
TAR_ORIG_NAME = $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz
TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME)))
orig: $(DIR_ORIG)

8
debian/rules.real vendored
View File

@ -2,10 +2,6 @@ export DH_OPTIONS
include debian/rules.defs
# VERSION_DEBIAN is the package source version; VERSION_DEBIAN_FULL
# includes any binNMU part.
VERSION_DEBIAN_FULL := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p')
binary-arch: install-kbuild install-usbip install-hyperv-daemons
ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32,$(DEB_BUILD_ARCH)),)
binary-arch: install-tools
@ -76,8 +72,8 @@ install-usbip: $(STAMPS_DIR)/build
dh_fixperms
dh_installdeb
dh_shlibdeps
test -n "$(VERSION)" -a -n "$(VERSION_DEBIAN_FULL)"
dh_gencontrol -- -v$(VERSION)+$(VERSION_DEBIAN_FULL)
test -n "$(VERSION)" -a -n "$(DEB_VERSION)"
dh_gencontrol -- -v$(VERSION)+$(DEB_VERSION)
dh_md5sums
dh_builddeb