r3203 - in branches/kernel-image-2.6.11: . arch/i386 debian
Jurij Smakov
jurij-guest@costa.debian.org
Fri, 20 May 2005 23:45:34 +0000
Author: jurij-guest
Date: 2005-05-20 23:45:33 +0000 (Fri, 20 May 2005)
New Revision: 3203
Modified:
branches/kernel-image-2.6.11/TODO
branches/kernel-image-2.6.11/arch/i386/control.in
branches/kernel-image-2.6.11/debian/rules
branches/kernel-image-2.6.11/debian/rules.subarch
branches/kernel-image-2.6.11/post-install.in
Log:
Corrected the naming, which is RFC-compliant now.
Tested subarch and no-subarch builds on i386.
Modified: branches/kernel-image-2.6.11/TODO
===================================================================
--- branches/kernel-image-2.6.11/TODO 2005-05-20 11:53:09 UTC (rev 3202)
+++ branches/kernel-image-2.6.11/TODO 2005-05-20 23:45:33 UTC (rev 3203)
@@ -13,3 +13,6 @@
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.
Modified: branches/kernel-image-2.6.11/arch/i386/control.in
===================================================================
--- branches/kernel-image-2.6.11/arch/i386/control.in 2005-05-20 11:53:09 UTC (rev 3202)
+++ branches/kernel-image-2.6.11/arch/i386/control.in 2005-05-20 23:45:33 UTC (rev 3203)
@@ -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
Modified: branches/kernel-image-2.6.11/debian/rules
===================================================================
--- branches/kernel-image-2.6.11/debian/rules 2005-05-20 11:53:09 UTC (rev 3202)
+++ branches/kernel-image-2.6.11/debian/rules 2005-05-20 23:45:33 UTC (rev 3203)
@@ -49,7 +49,7 @@
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
Modified: branches/kernel-image-2.6.11/debian/rules.subarch
===================================================================
--- branches/kernel-image-2.6.11/debian/rules.subarch 2005-05-20 11:53:09 UTC (rev 3202)
+++ branches/kernel-image-2.6.11/debian/rules.subarch 2005-05-20 23:45:33 UTC (rev 3203)
@@ -26,8 +26,10 @@
#
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 @@
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 @@
# 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 @@
# 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 @@
#
# 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 @@
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) $@
Modified: branches/kernel-image-2.6.11/post-install.in
===================================================================
--- branches/kernel-image-2.6.11/post-install.in 2005-05-20 11:53:09 UTC (rev 3202)
+++ branches/kernel-image-2.6.11/post-install.in 2005-05-20 23:45:33 UTC (rev 3203)
@@ -21,8 +21,21 @@
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
@@ -87,15 +100,6 @@
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.
#