[kernel] r19188 - in dists/sid/linux-tools/debian: . bin

Ben Hutchings benh at alioth.debian.org
Sun Jun 24 00:45:01 UTC 2012


Author: benh
Date: Sun Jun 24 00:44:58 2012
New Revision: 19188

Log:
Clean up usbip package version generation

Extract the current usbip version from its config.h file rather than
repeating it in rules.real where we might forget to update it.

Pass VERSION_DEBIAN into rules.real from rules.gen rather than
invoking dpkg-parsechangelog again.

Modified:
   dists/sid/linux-tools/debian/bin/gencontrol.py
   dists/sid/linux-tools/debian/rules.real

Modified: dists/sid/linux-tools/debian/bin/gencontrol.py
==============================================================================
--- dists/sid/linux-tools/debian/bin/gencontrol.py	Sat Jun 23 23:56:30 2012	(r19187)
+++ dists/sid/linux-tools/debian/bin/gencontrol.py	Sun Jun 24 00:44:58 2012	(r19188)
@@ -39,6 +39,7 @@
     def do_main_setup(self, vars, makeflags):
         makeflags.update({
             'VERSION': self.version.linux_version,
+            'VERSION_DEBIAN': self.version.complete,
             'UPSTREAMVERSION': self.version.linux_upstream,
         })
 

Modified: dists/sid/linux-tools/debian/rules.real
==============================================================================
--- dists/sid/linux-tools/debian/rules.real	Sat Jun 23 23:56:30 2012	(r19187)
+++ dists/sid/linux-tools/debian/rules.real	Sun Jun 24 00:44:58 2012	(r19188)
@@ -3,8 +3,6 @@
 include debian/rules.defs
 
 DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
-PACKAGE_VERSION := $(shell dpkg-parsechangelog | sed -ne 's,^Version: ,,p')
-USBIP_VERSION := 1.1.1+$(PACKAGE_VERSION)
 
 binary-arch: install-kbuild install-usbip
 ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),)
@@ -61,6 +59,7 @@
 
 install-usbip: DH_OPTIONS = -plibusbip-dev -pusbip
 install-usbip: DIR = $(CURDIR)/debian/tmp
+install-usbip: override VERSION := $(shell sed -ne 's,^#define PACKAGE_VERSION "\(.*\)"$$,\1,p' $(BUILD_DIR)/drivers/staging/usbip/userspace/config.h)
 install-usbip: $(STAMPS_DIR)/build
 	dh_testdir
 	dh_testroot
@@ -75,6 +74,7 @@
 	dh_fixperms
 	dh_installdeb
 	dh_shlibdeps
-	dh_gencontrol -- -v$(USBIP_VERSION)
+	test -n "$(VERSION)" -a -n "$(VERSION_DEBIAN)"
+	dh_gencontrol -- -v$(VERSION)+$(VERSION_DEBIAN)
 	dh_md5sums
 	dh_builddeb



More information about the Kernel-svn-changes mailing list