From 3a14c6828977402a11d883020cfd63f7759ea6c8 Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Thu, 14 Jul 2005 08:29:26 +0000 Subject: [PATCH] Add flavour dependencies for the dummy headers package; prettify output, distinguishing between UP and SMP; shell is evil svn path=/trunk/kernel/source/linux-kernel-2.6.12/; revision=3481 --- debian/rules | 62 +++++++++++++++------ debian/templates/control.headers.arch.in | 2 +- debian/templates/control.headers.flavour.in | 8 +-- debian/templates/control.image.in | 6 +- 4 files changed, 52 insertions(+), 26 deletions(-) diff --git a/debian/rules b/debian/rules index 73b6b2b66..b18a12313 100755 --- a/debian/rules +++ b/debian/rules @@ -223,29 +223,55 @@ binary: binary-indep binary-arch archs := $(shell find debian/arch/ -mindepth 1 -maxdepth 1 -type d ! -name '.svn' -printf '%f\n') debian/control: $(wildcard debian/templates/control.*.in) rm -f control.tmp 2>/dev/null - substitute() { \ - sa_tmp="debian/arch/$$2/*/config.$$3"; \ - sa=""; \ - [ -f $$sa_tmp ] && sa=$$(basename $$(dirname $$sa_tmp))-; \ - cat debian/templates/control.$$1 | \ - sed -e 's/@version@/$(version)/g' \ - -e 's/@major@/$(major)/g' \ - -e "s/@arch@/$$2/g" \ - -e "s/@subarch@/$$sa/g" \ - -e "s/@flavour@/$$3/g" \ - -e 's/@ltver@/$(ltver)/g' \ - -e 's/@srcver@/$(srcver)/g' \ - -e 's/@lt_depends@/$(lt_depends)/g' \ - -e 's/@lt_provides@/$(lt_provides)/g' \ - -e 's/@abiname@/$(abiname)/g' | \ - sed '/^[[:space:]]*$$/d' | \ - sed 's/^Package:/\n&/g'; \ - }; \ list_flavours() { \ find debian/arch/$$1/ -name 'config.*' \ ! -name '*.svn*' -printf '%f\n' | \ sed 's/^config\.//'; \ }; \ + get_all_headers_pkgs() { \ + result=""; \ + for flavour in `list_flavours $$1`; do \ + if [ -z "$$result" ]; then \ + comma=""; \ + else \ + comma=", "; \ + fi; \ + result="$${result}$${comma}linux-headers-$$2$(version)-$(abiname)-$$flavour"; \ + done; \ + echo $$result; \ + }; \ + all_headers_pkgs=`get_all_headers_pkgs`; \ + substitute() { \ + sa_tmp="debian/arch/$$2/*/config.$$3"; \ + sa=""; \ + [ -f $$sa_tmp ] && sa=$$(basename $$(dirname $$sa_tmp))-; \ + all_headers_pkgs=`get_all_headers_pkgs $$2 $$sa`; \ + if expr "$$3" : '.*-smp$$' > /dev/null; then \ + smp="multi"; \ + shortsmp="SMP"; \ + else \ + smp="uni" ;\ + shortsmp="UP"; \ + fi; \ + flavour=`echo $$3| sed 's/-smp//'`; \ + cat debian/templates/control.$$1 | \ + sed -e 's/@version@/$(version)/g' \ + -e 's/@major@/$(major)/g' \ + -e "s/@arch@/$$2/g" \ + -e "s/@subarch@/$$sa/g" \ + -e "s/@flavour@/$$3/g" \ + -e "s/@smpflavour@/$${smp}processor $${flavour}/g" \ + -e "s/@shortsmpflavour@/$${shortsmp} $${flavour}/g" \ + -e 's/@ltver@/$(ltver)/g' \ + -e 's/@srcver@/$(srcver)/g' \ + -e 's/@lt_depends@/$(lt_depends)/g' \ + -e 's/@lt_provides@/$(lt_provides)/g' \ + -e 's/@abiname@/$(abiname)/g' \ + -e "s/@smp@/$$smp/g" \ + -e "s/@allheaders@/$$all_headers_pkgs/g" | \ + sed '/^[[:space:]]*$$/d' | \ + sed 's/^Package:/\n&/g'; \ + }; \ substitute source.in "" "" >> control.tmp; \ substitute main.in "" "" >> control.tmp; \ substitute headers.in "" "" >> control.tmp; \ diff --git a/debian/templates/control.headers.arch.in b/debian/templates/control.headers.arch.in index a4641b1fa..9730e67bd 100644 --- a/debian/templates/control.headers.arch.in +++ b/debian/templates/control.headers.arch.in @@ -2,7 +2,7 @@ Package: linux-headers-@subarch@@version@-@abiname@-@arch@ Architecture: @arch@ Section: devel Priority: optional -Depends: TODO +Depends: @allheaders@ Description: Virtual package that depends on all @version@ kernel headers for @arch@ This package provides common kernel header files for version @version@ on @arch@, used to build out-of-tree kernel modules and the like. It is mainly diff --git a/debian/templates/control.headers.flavour.in b/debian/templates/control.headers.flavour.in index 114cc16a0..207faf82a 100644 --- a/debian/templates/control.headers.flavour.in +++ b/debian/templates/control.headers.flavour.in @@ -4,10 +4,10 @@ Section: devel Priority: optional Depends: coreutils | fileutils (>= 4.0), linux-headers-@version@-@abiname@ Provides: linux-headers, linux-headers-@major@ -Description: Architecture-specific header files for Linux kernel @version@ +Description: Architecture-specific header files for Linux kernel @version@ on @shortsmpflavour@ This package provides the architecture-specific kernel header files - for Linux kernel @version@ on @flavour@-class machines, generally used for - building out-of-tree kernel modules. These files are going to be installed - into /usr/src/linux-headers-@subarch@@version@-@abiname@-@flavour@, and can + for Linux kernel @version@ on @smpflavour@-class machines, generally + used for building out-of-tree kernel modules. These files are going to be + installed into /usr/src/linux-headers-@subarch@@version@-@abiname@-@flavour@, and can be used for building modules that load into the kernel provided by the linux-image-@subarch@@version@-@abiname@-@flavour@ package. diff --git a/debian/templates/control.image.in b/debian/templates/control.image.in index 15702ceb3..19c609d87 100644 --- a/debian/templates/control.image.in +++ b/debian/templates/control.image.in @@ -7,6 +7,6 @@ Depends: initrd-tools (>= 0.1.78), coreutils | fileutils (>= 4.0), module-init-t Conflicts: hotplug (<< 0.0.20040105-1) Suggests: aboot [alpha], lilo (>= 19.1) | grub [amd64 i386], elilo [ia64], vmelilo [m68k], arcboot (>= 0.3.8) [mips], colo [mipsel], delo [mipsel], s390-tools [s390], silo [sparc], fdutils, linux-doc-@version@ | linux-source-@version@ Recommends: irqbalance [i386] -Description: Linux kernel @version@ image on @flavour@ - This package provides the binary image and pre-built loadable modules of - Linux kernel @version@ for @flavour@-class processors. +Description: Linux kernel @version@ image on @shortsmpflavour@ + This package provides the binary image and pre-built loadable modules for + Linux kernel @version@ on @smpflavour@-class machines.