Author: ultrotter Date: 2006-02-20 17:29:54 +0000 (Mon, 20 Feb 2006) New Revision: 37 Modified: trunk/debian/changelog trunk/debian/rules Log: Make debian/rules policy compliant: - Divide things between binary dependent and independent targets - Use the relevant targets only to do what they are supposed to - Support correctly both complete and binary only builds Update changelog Modified: trunk/debian/changelog ==================================================================--- trunk/debian/changelog 2006-02-20 14:35:23 UTC (rev 36) +++ trunk/debian/changelog 2006-02-20 17:29:54 UTC (rev 37) @@ -17,6 +17,7 @@ - Add dpatch structure to the package - Remove build-dependency on gcc (it''s build essential anyway) - Suggest xen-tools in the xen metapackage + - Make debian/rules policy compliant * Ralph Passgang <ralph@debianbase.de> - Added changes from 3.0.1-0tha3 - Removed patch generation from kernel source in debian/rules @@ -25,7 +26,7 @@ extraversion stripped off) - Changed debian/linux-patch-xen.kpatches - -- Julien Danjou <acid@debian.org> Mon, 20 Feb 2006 15:34:37 +0100 + -- Guido Trotter <ultrotter@debian.org> Mon, 20 Feb 2006 18:29:10 +0100 xen (3.0.1-0tha3) unstable; urgency=low Modified: trunk/debian/rules ==================================================================--- trunk/debian/rules 2006-02-20 14:35:23 UTC (rev 36) +++ trunk/debian/rules 2006-02-20 17:29:54 UTC (rev 37) @@ -23,24 +23,55 @@ clean: really-clean unpatch really-clean: - $(MAKE) mrproper - rm debian/install debian/stamps -rf + dh_testdir + dh_testroot + $(MAKE) distclean + rm -f build-arch-stamp build-indep-stamp + rm -rf debian/install dh_clean -build: patch-stamp debian/stamps/build +build: patch-stamp build-indep build-arch -debian/stamps/build: - mkdir -p $(@D) - rm -rf debian/install - $(MAKE) dist DESTDIR=$(CURDIR)/debian/install KERNELS= XEN_PYTHON_NATIVE_INSTALL=1 CC=$(CC) GCC=$(CC) HOSTCC=$(CC) +build-arch: build-arch-stamp +build-arch-stamp: ifeq ($(DEB_BUILD_ARCH),i386) - $(MAKE) mrproper - $(MAKE) xen DESTDIR=$(CURDIR)/debian/install KERNELS= GCC=$(CC) CC=$(CC) HOSTCC=$(CC) XEN_TARGET_X86_PAE=y TARGET=$(CURDIR)/xen/xen_pae + # This actually installs the PAE hypervisor rather than just building it! + # Unfortunately it''s the only way to build it without losing it later on, when cleaning for the real thing! + $(MAKE) install-xen XEN_TARGET_X86_PAE=y TARGET=$(CURDIR)/xen/xen_pae DESTDIR=$(CURDIR)/debian/install + $(MAKE) -C xen clean endif - touch $@ + $(MAKE) -C xen build + $(MAKE) -C tools all XEN_PYTHON_NATIVE_INSTALL=1 + $(MAKE) -C docs man-pages # Needed, otherwise dpkg-buildpackage -B fails + touch build-arch-stamp -install: debian/stamps/build +build-indep: build-indep-stamp +build-indep-stamp: + $(MAKE) -C docs all + touch build-indep-stamp + +install: install-indep install-arch +install-indep: + dh_testdir + dh_testroot + dh_clean -k -i + dh_installdirs -i + + $(MAKE) install-docs DESTDIR=$(CURDIR)/debian/install + + dh_install -i --sourcedir=$(CURDIR)/debian/install + +install-arch: + dh_testdir + dh_testroot + dh_clean -k -s + dh_installdirs -s + $(MAKE) install-tools XEN_PYTHON_NATIVE_INSTALL=1 DESTDIR=$(CURDIR)/debian/install + $(MAKE) install-xen DESTDIR=$(CURDIR)/debian/install + # This should probably be install-hotplug when building for sarge... $(MAKE) -C tools/examples install-udev DESTDIR=$(CURDIR)/debian/install + cp -dR $(CURDIR)/docs/man1 $(CURDIR)/debian/install/usr/share/man # Needed, otherwise dpkg-buildpackage -B fails + cp -dR $(CURDIR)/docs/man5 $(CURDIR)/debian/install/usr/share/man # Needed, otherwise dpkg-buildpackage -B fails find $(CURDIR)/debian/install -name ''*.pyc'' | xargs rm mkdir -p debian/install/etc/xen/xend/server mv debian/install/usr/lib/python2.3/site-packages/xen/xend/server/params.py debian/install/etc/xen/xend/params.py @@ -51,14 +82,13 @@ debian/install/usr/lib/python2.3/site-packages/xen/xend/XendClient.py \ debian/install/usr/lib/python2.3/site-packages/xen/xend/server/SrvServer.py \ debian/install/usr/lib/python2.3/site-packages/xen/xend/sxp.py + + dh_install -s --sourcedir=$(CURDIR)/debian/install -binary: install +binary-common: @echo "DEB_VERSION=''$(DEB_VERSION)'' DEB_REVISION=''$(DEB_REVISION)'' UP_VERSION=''$(UP_VERSION)'' DEB_BUILD_ARCH=''$(DEB_BUILD_ARCH)''" - dh_clean -k dh_testdir dh_testroot - dh_install -N xen-docs --sourcedir=$(CURDIR)/debian/install --list-missing - dh_install -p xen-docs -X examples --sourcedir=$(CURDIR)/debian/install dh_installdocs dh_installchangelogs dh_installkpatches @@ -73,3 +103,15 @@ dh_installdeb dh_gencontrol dh_builddeb + +# Build architecture independant packages using the common target. +binary-indep: build-indep install-indep + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common + +# Build architecture dependant packages using the common target. +binary-arch: build-arch install-arch + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure +