Corrected the naming, which is RFC-compliant now.
Tested subarch and no-subarch builds on i386. svn path=/branches/kernel-image-2.6.11/; revision=3203
This commit is contained in:
parent
54730b8f7f
commit
e11de50bef
3
TODO
3
TODO
|
@ -13,3 +13,6 @@ Major TODO items remaining:
|
|||
for example).
|
||||
|
||||
* Get rid of the /lib/modules/<version>/source symlink.
|
||||
|
||||
* Generate the control file for individual files dynamically, so that we
|
||||
do not have that ridiculous master control file.
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
Package: kernel-headers-@version@-@abiname@-foo
|
||||
Architecture: any
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Depends: coreutils | fileutils (>= 4.0)
|
||||
Provides: kernel-headers, kernel-headers-2.6
|
||||
Description: Header files related to Linux kernel version @version@
|
||||
This package provides kernel header files for version @version@, generally
|
||||
used for building out-of-tree kernel modules. See the 'module-assistant'
|
||||
package for more information.
|
||||
.
|
||||
This package consists mostly of the common files between the subarchitecture
|
||||
specific header packages, which should be used for building modules.
|
||||
.
|
||||
For more information you can also read:
|
||||
/usr/share/doc/kernel-headers-@version@-@abiname@/debian.README.gz.
|
||||
|
||||
Package: kernel-headers-2.6.11-1-686
|
||||
Architecture: i386
|
||||
Section: devel
|
||||
|
|
|
@ -49,7 +49,7 @@ build-stamp: unpack-stamp
|
|||
clean:
|
||||
dh_testdir
|
||||
rm -f *-stamp-* *-stamp config.*
|
||||
rm -f header-install-* post-install bin/touch.orig
|
||||
rm -f header-install-* post-install-* bin/touch.orig
|
||||
rm -rf kernel-source-* build-* install-*
|
||||
dh_clean
|
||||
|
||||
|
|
|
@ -26,8 +26,10 @@ karch := $(DEB_HOST_ARCH)
|
|||
#
|
||||
ifeq ($(subarch),none)
|
||||
basedir := arch/$(karch)
|
||||
append :=
|
||||
else
|
||||
basedir := arch/$(karch)/$(subarch)
|
||||
append := -$(subarch)
|
||||
endif
|
||||
default := $(basedir)/config.default
|
||||
configs := $(notdir $(wildcard $(basedir)/config.*))
|
||||
|
@ -38,8 +40,9 @@ ifndef flavours
|
|||
flavours := $(patsubst config.%,%,$(configs))
|
||||
endif
|
||||
build_prefix := build-$(subarch)-
|
||||
|
||||
|
||||
-include $(basedir)/Makefile.inc
|
||||
|
||||
#
|
||||
# Here we construct the command lines for different make-kpkg
|
||||
# calls (build, kernel-image, kernel-headers) based on the values
|
||||
|
@ -50,7 +53,7 @@ build_prefix := build-$(subarch)-
|
|||
# a lot of grief.
|
||||
#
|
||||
kpkg_headers_cmd := HEADER_CLEAN_HOOK='$(CURDIR)/header-install-$(subarch)'
|
||||
kpkg_headers_cmd += make-kpkg --append-to-version $(debnum)
|
||||
kpkg_headers_cmd += make-kpkg --append-to-version $(debnum)$(append)
|
||||
kpkg_build_cmd := make-kpkg --append-to-version $(debnum)-$$i
|
||||
ifdef added_patches
|
||||
kpkg_headers_cmd += --added_patches $(subst @uver@,$(uver),$(added_patches))
|
||||
|
@ -142,9 +145,10 @@ header-install-$(subarch): header-install.in
|
|||
# The way to make the correct package names is to make a
|
||||
# subarch-specific post-install script...
|
||||
#
|
||||
post-install: post-install.in
|
||||
post-install-$(subarch): post-install.in
|
||||
sed -e 's,@initrd_modules@,$(initrd_modules),' \
|
||||
post-install.in > post-install
|
||||
-e 's,@append_subarch@,$(append),' \
|
||||
post-install.in > post-install-$(subarch)
|
||||
#
|
||||
# Generates the kernel config file for a subarch by merging
|
||||
# the arch-independent config file (arch/config.common),
|
||||
|
@ -167,7 +171,7 @@ config.%:
|
|||
#
|
||||
# TODO: subarch specific patches
|
||||
#
|
||||
$(kdir): post-install
|
||||
$(kdir): post-install-$(subarch)
|
||||
dh_testdir
|
||||
tar jxf /usr/src/$(tkdir).tar.bz2
|
||||
mkdir -p $(tkdir)/debian
|
||||
|
@ -176,7 +180,7 @@ $(kdir): post-install
|
|||
cp debian/copyright $(tkdir)/debian
|
||||
cp $(default) $(tkdir)/.config
|
||||
touch $(tkdir)/debian/official
|
||||
install post-install $(tkdir)/debian
|
||||
install post-install-$(subarch) $(tkdir)/debian/post-install
|
||||
cd $(tkdir) && $(kpatch)
|
||||
# Here we need to do the subarch-specific patching
|
||||
mv $(tkdir) $@
|
||||
|
|
|
@ -21,8 +21,21 @@ debhelper_post() {
|
|||
dh_md5sums --package="$1"
|
||||
dh_builddeb --package="$1"
|
||||
}
|
||||
# The version which ends up here is something like
|
||||
# $(version)-$(abiname)-$(flavour) and debnum is just
|
||||
# -$(abiname), so that the variables get the values:
|
||||
# suffix=$(flavour)
|
||||
# prefix=$(version)-$(abiname)
|
||||
# prefix is then used to form a destination directory
|
||||
# to link to. For cases with subarch we need to link
|
||||
# to kernel-headers-$(version)-$(abiname)-$(subarch),
|
||||
# not just kernel-headers-$(version)-$(abiname). Note
|
||||
# that the append_subarch substitution must contain a
|
||||
# dash, if it is non-empty.
|
||||
#
|
||||
append='@append_subarch@'
|
||||
suffix=${version#*$debnum-}
|
||||
prefix=${version%%-*}$debnum
|
||||
prefix=${version%%-*}${debnum}${append}
|
||||
pkg=kernel-headers-$version
|
||||
top=$PWD/debian/$pkg
|
||||
dir=$top/usr/src/kernel-headers-$version
|
||||
|
@ -86,15 +99,6 @@ ln -s /usr/src/kernel-headers-$version $top/lib/modules/$version/build
|
|||
|
||||
debhelper_post $pkg
|
||||
|
||||
#
|
||||
# This is kernel-build cruft which we will probably phase out
|
||||
#
|
||||
# bpkg=kernel-build-$prefix
|
||||
# top=$PWD/../debian/$bpkg
|
||||
#
|
||||
# [ -d $top/usr/src/$bpkg ] || mkdir -p $top/usr/src/$bpkg
|
||||
# ln -s ../kernel-headers-$version $top/usr/src/$bpkg/$suffix
|
||||
|
||||
#
|
||||
# Check whether we should force any modules to be available
|
||||
# on the initrd.
|
||||
|
|
Loading…
Reference in New Issue