[kernel] r18433 - in dists/trunk/firmware-free/debian: . bin

Ben Hutchings benh at alioth.debian.org
Thu Dec 29 23:13:41 UTC 2011


Author: benh
Date: Thu Dec 29 23:13:40 2011
New Revision: 18433

Log:
Update gencontrol.py and rules to work with current linux-support package

Modified:
   dists/trunk/firmware-free/debian/bin/gencontrol.py
   dists/trunk/firmware-free/debian/rules
   dists/trunk/firmware-free/debian/rules.real

Modified: dists/trunk/firmware-free/debian/bin/gencontrol.py
==============================================================================
--- dists/trunk/firmware-free/debian/bin/gencontrol.py	Thu Dec 29 18:28:04 2011	(r18432)
+++ dists/trunk/firmware-free/debian/bin/gencontrol.py	Thu Dec 29 23:13:40 2011	(r18433)
@@ -10,7 +10,7 @@
 import debian_linux.gencontrol
 from debian_linux.gencontrol import Makefile, MakeFlags, PackagesList
 from debian_linux.utils import SortedDict, TextWrapper
-from debian_linux.utils import Templates as TemplatesBase
+from debian_linux.utils import Templates as TemplatesBase, read_control
 
 class PackageDescription(PackageDescriptionBase):
     __slots__ = ()
@@ -92,7 +92,7 @@
             if os.path.exists(filename):
                 f = file(filename)
                 if prefix == 'control':
-                    return self._read_control(f)
+                    return read_control(f)
                 elif prefix == 'templates':
                     return self._read_templates(f)
                 return f.read()
@@ -160,9 +160,6 @@
 
         makeflags = MakeFlags()
 
-        for i in ('build', 'binary-arch', 'setup'):
-            makefile.add("%s_%%" % i, cmds = ["@true"])
-
         for package in config_entry['packages']:
             self.do_package(packages, makefile, package, vars.copy(), makeflags.copy())
 

Modified: dists/trunk/firmware-free/debian/rules
==============================================================================
--- dists/trunk/firmware-free/debian/rules	Thu Dec 29 18:28:04 2011	(r18432)
+++ dists/trunk/firmware-free/debian/rules	Thu Dec 29 23:13:40 2011	(r18433)
@@ -4,9 +4,48 @@
 CONTROL_FILES += debian/bin/gencontrol.py defines $(wildcard */defines) $(wildcard */copyright) $(wildcard */LICENSE*)
 
 include debian/rules.defs
-include /usr/src/linux-support-$(KERNELVERSION)/modules/rules.include
 
-GENCONTROL = debian/bin/gencontrol.py $(KERNELVERSION)
+GENCONTROL = debian/bin/gencontrol.py
+
+__BINNMU := $(shell dpkg-parsechangelog | sed -rne 's,^Version: .*\+b([0-9]+)$$,\1,p')
+
+# Nothing to build
+build-indep build-arch build:
+
+clean: debian/control
+	dh_testdir
+	dh_clean
+
+binary-indep:
+	dh_testdir
+	$(MAKE) -f debian/rules.gen binary-indep
+
+binary-arch:
+
+binary:	binary-indep binary-arch
+
+CONTROL_FILES += debian/changelog $(wildcard debian/templates/control.*) 
+debian/control debian/rules.gen: $(GENCONTROL) $(CONTROL_FILES)
+ifeq ($(wildcard debian/control.md5sum),)
+	$(MAKE) -f debian/rules debian/control-real
+else ifeq ($(__BINNMU),)
+	md5sum --check debian/control.md5sum --status || \
+		$(MAKE) -f debian/rules debian/control-real
+else
+	grep -v debian/changelog debian/control.md5sum | md5sum --check - --status || \
+		$(MAKE) -f debian/rules debian/control-real
+endif
+
+debian/control-real: $(GENCONTROL) $(CONTROL_FILES)
+	$(GENCONTROL) $(KERNELVERSION) /usr/src/linux-support-$(KERNELVERSION)
+	md5sum $^ > debian/control.md5sum
+	@echo
+	@echo This target is made to fail intentionally, to make sure
+	@echo that it is NEVER run during the automated build. Please
+	@echo ignore the following error, the debian/control file has
+	@echo been generated SUCCESSFULLY.
+	@echo
+	exit 1
 
 maintainerclean:
 	-rm debian/control debian/control.md5sum debian/rules.gen
@@ -15,3 +54,5 @@
 	-rm debian/*.preinst
 	-rm debian/*.postinst
 	-rm debian/*.templates
+
+.PHONY: clean build-indep build-arch build binary-indep binary-arch binary

Modified: dists/trunk/firmware-free/debian/rules.real
==============================================================================
--- dists/trunk/firmware-free/debian/rules.real	Thu Dec 29 18:28:04 2011	(r18432)
+++ dists/trunk/firmware-free/debian/rules.real	Thu Dec 29 23:13:40 2011	(r18433)
@@ -6,7 +6,6 @@
 export DH_OPTIONS
 
 include debian/rules.defs
-include /usr/src/linux-support-$(KERNELVERSION)/modules/rules.real.include
 
 #
 # Targets



More information about the Kernel-svn-changes mailing list