[Pkg-xen-changes] r370 - trunk/xen-3.0/debian

Bastian Blank waldi at alioth.debian.org
Sun Oct 29 10:57:27 CET 2006


Author: waldi
Date: Sun Oct 29 10:57:27 2006
New Revision: 370

Modified:
   trunk/xen-3.0/debian/rules
   trunk/xen-3.0/debian/rules.defs
   trunk/xen-3.0/debian/rules.real
Log:
debian/rules, debian/rules.defs, debian/rules.real:
Don't include external files.


Modified: trunk/xen-3.0/debian/rules
==============================================================================
--- trunk/xen-3.0/debian/rules	(original)
+++ trunk/xen-3.0/debian/rules	Sun Oct 29 10:57:27 2006
@@ -3,12 +3,12 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-include debian/rules.defs
-include /usr/src/linux-support-$(KERNELVERSION)/modules/rules.include
+DEB_HOST_ARCH  := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
 VERSION := $(shell dpkg-parsechangelog | perl -ne '/^Version:\s+(\S+)-[^-]+$$/ && print $$1;')
 
-GENCONTROL = debian/bin/gencontrol.py $(KERNELVERSION)
+include debian/rules.defs
 
 setup: $(STAMPS_DIR)/setup-base
 $(STAMPS_DIR)/setup-base: debian/control $(BUILD_DIR) $(STAMPS_DIR)
@@ -16,7 +16,33 @@
 	$(MAKE) -f debian/rules.gen setup-$(DEB_HOST_ARCH)
 	touch $@
 
-$(BUILD_STAMP): $(STAMPS_DIR)/setup-base
+build: debian/control $(STAMPS_DIR)/build-base
+$(STAMPS_DIR)/build-base: $(STAMPS_DIR)/setup-base
+	dh_testdir
+	$(MAKE) -f debian/rules.gen build-$(DEB_HOST_ARCH)
+	touch $@
+
+$(BUILD_DIR) $(STAMPS_DIR):
+	@[ -d $@ ] || mkdir $@
+
+maintainerclean:
+	rm -f debian/control* debian/rules.gen debian/xen-hypervisor-* debian/xen-utils-*
+	rm -rf $(filter-out .svn debian, $(wildcard * .[^.]*))
+
+clean: debian/control
+	dh_testdir
+	rm -rf $(BUILD_DIR) $(STAMPS_DIR)
+	dh_clean
+
+binary-indep:
+	dh_testdir
+	$(MAKE) -f debian/rules.gen binary-indep
+
+binary-arch:
+	dh_testdir
+	$(MAKE) -f debian/rules.gen binary-arch-$(DEB_HOST_ARCH)
+
+binary:	binary-indep binary-arch
 
 DIR_ORIG = ../orig/xen-$(MAJOR)-$(VERSION)
 
@@ -26,7 +52,28 @@
 # This is to make dpatch-edit-patch work
 unpatch: clean                                 
 
-maintainerclean:
-	rm -f debian/control* debian/rules.gen debian/xen-hypervisor-* debian/xen-utils-*
-	rm -rf $(filter-out .svn debian, $(wildcard * .[^.]*))
+CONTROL_FILES += debian/changelog $(wildcard debian/templates/control.*) 
+CONTROL_FILES += $(wildcard debian/arch/defines) $(wildcard debian/arch/*/defines)
+GENCONTROL = $(__MODULES_DIR)gencontrol.py
+debian/control debian/rules.gen: $(CONTROL_FILES)
+	if [ -f debian/control ] && [ -f debian/control.md5sum ] && [ -f debian/rules.gen ]; then \
+		if md5sum $^ | diff - debian/control.md5sum > /dev/null; then true; else \
+			$(MAKE) -f debian/rules debian/control-real; \
+		fi \
+	else \
+		$(MAKE) -f debian/rules debian/control-real; \
+	fi
+
+
+debian/control-real: $(CONTROL_FILES)
+	debian/bin/gencontrol.py $(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
 
+.PHONY: clean build binary-indep binary-arch binary

Modified: trunk/xen-3.0/debian/rules.defs
==============================================================================
--- trunk/xen-3.0/debian/rules.defs	(original)
+++ trunk/xen-3.0/debian/rules.defs	Sun Oct 29 10:57:27 2006
@@ -1,2 +1,5 @@
 KERNELVERSION := 2.6.18-1
 MAJOR := 3.0
+BUILD_DIR = debian/build
+STAMPS_DIR = debian/stamps
+TEMPLATES_DIR = debian/templates

Modified: trunk/xen-3.0/debian/rules.real
==============================================================================
--- trunk/xen-3.0/debian/rules.real	(original)
+++ trunk/xen-3.0/debian/rules.real	Sun Oct 29 10:57:27 2006
@@ -1,5 +1,12 @@
+DEB_HOST_ARCH     := $(shell dpkg-architecture -a$(ARCH) -qDEB_HOST_ARCH)
+DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -a$(ARCH) -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_ARCH    := $(shell dpkg-architecture -a$(ARCH) -qDEB_BUILD_ARCH)
+
+export DH_OPTIONS
+
 include debian/rules.defs
-include /usr/src/linux-support-$(KERNELVERSION)/modules/rules.real.include
+
+HEADERS_DIR = /usr/src/linux-headers-$(UPSTREAMVERSION)$(ABINAME)$(LOCALVERSION)
 
 binary-arch-arch: install-utils_$(ARCH)
 binary-arch-flavour: install-hypervisor_$(ARCH)_$(FLAVOUR)



More information about the Pkg-xen-changes mailing list