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
This commit is contained in:
Joshua Kwan 2005-07-14 08:29:26 +00:00
parent 5df78fa922
commit 3a14c68289
4 changed files with 52 additions and 26 deletions

62
debian/rules vendored
View File

@ -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; \

View File

@ -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

View File

@ -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.

View File

@ -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.