* debian/bin/gencontrol.pya: Export kernel-header-dirs as KERNEL_HEADER_DIRS for subarch.

* debian/bin/install-image
  - Move from debian/templates/post-install.in.
  - Use KERNEL_HEADER_DIRS for asm-directory selection.
* debian/bin/install-header: Remove svn:executable property.
* debian/rules.real: Use debian/bin/install-image.

svn path=/dists/trunk/linux-2.6/; revision=4609
This commit is contained in:
Bastian Blank 2005-10-23 12:06:48 +00:00
parent 65ee433593
commit ef7efe41cf
4 changed files with 20 additions and 44 deletions

View File

@ -426,6 +426,9 @@ def process_real_subarch(packages, makefile, config, arch, subarch, vars, makefl
makefile.append(("%s-%s-%s:: %s-%s-%s-real" % (i, arch, subarch, i, arch, subarch), None))
makeflags['SUBARCH'] = subarch
for i in ('kernel-header-dirs', 'KERNEL_HEADER_DIRS'),:
if config_entry.has_key(i[0]):
makeflags[i[1]] = config_entry[i[0]]
makeflags_string = ' '.join(["%s='%s'" % i for i in makeflags.iteritems()])
cmds_binary_arch = []

0
debian/bin/install-header vendored Executable file → Normal file
View File

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# This is the hook file executed by make-kpkg in the end of creation
# of the linux-image for a particular flavour. The major task it performs
@ -56,7 +56,6 @@ debhelper_pre "$pkg"
# touching it until we can invent something better.
#
mkdir -p "$dir/arch/$arch/kernel"
mkdir -p "$dir/include/asm-$arch"
mkdir -p "$dir/include/linux"
cp -a .config "$dir"
echo "$DEBIAN_VERSION-$DEBIAN_ABINAME-$DEBIAN_FLAVOUR" > "$dir/.extraversion"
@ -82,26 +81,19 @@ find include -mindepth 1 -maxdepth 1 \
-printf "../../linux-headers-$prefix/%p\n" |
xargs ln -s --target-directory="$dir/include"
cp -a include/config "$dir/include"
ln -sf "asm-${arch}" "$dir/include/asm"
find "include/asm-$arch" -mindepth 1 -maxdepth 1 \
\( -type f -a ! -links 2 -o ! -type f \) \
-printf "../../../linux-headers-$prefix/%p\n" |
xargs --no-run-if-empty ln -s --target-directory="$dir/include/asm-$arch"
find "include/asm-$arch" -mindepth 1 -maxdepth 1 \
-type f -links 2 |
xargs --no-run-if-empty ln -f --target-directory="$dir/include/asm-$arch"
for i in include/asm-*
do
case ${i#include/asm-} in
$arch)
;;
generic | @headers_dirs@)
ln -s "../../linux-headers-$prefix/$i" "$dir/$i"
;;
*)
;;
esac
for i in generic $KERNEL_HEADER_DIRS; do
mkdir "$dir/include/asm-$i"
find "include/asm-$i" -mindepth 1 -maxdepth 1 \
\( -type f -a ! -links 2 -o ! -type f \) \
-printf "../../../linux-headers-$prefix/%p\n" |
xargs --no-run-if-empty ln -s --target-directory="$dir/include/asm-$i"
find "include/asm-$i" -mindepth 1 -maxdepth 1 \
-type f -links 2 |
xargs --no-run-if-empty ln -f --target-directory="$dir/include/asm-$i"
done
find include/linux -mindepth 1 -maxdepth 1 \
! -name autoconf.h -a ! -name compile.h -a ! -name version.h \
-printf "../../../linux-headers-$prefix/%p\n" |
@ -136,11 +128,6 @@ if [ -n "${modules}" ]; then
done
fi
# Execute any extra post-install command provided by the arch/subarch/flavour
if [ '@extra_postinstall_command@' ]; then
@extra_postinstall_command@
fi
#
# Clean up the build and source symlinks
#

24
debian/rules.real vendored
View File

@ -37,7 +37,6 @@ include debian/rules.defs
# in Makefile.inc. @flavour@ in the expressions is going to be
# replaced by the flavour for which the command is run.
#
kpkg_header := HEADER_CLEAN_HOOK='$(CURDIR)/debian/bin/install-header'
kpkg_header += make-kpkg --append-to-version '$(KPKG_ABINAME)'
kpkg_header += --arch '$(ARCH)'
kpkg_header += --stem linux
@ -79,20 +78,6 @@ setup-arch: $(STAMPS_DIR)/source
setup-subarch: $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)
setup-flavour: $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
#
# The way to make the correct package names is to make a
# subarch-specific post-install script...
#
ifdef extra_postinstall_command
extra_command := $(extra_postinstall_command)
else
extra_command := true
endif
$(BUILD_DIR)/post-install-$(ARCH)-$(SUBARCH): $(TEMPLATES_DIR)/post-install.in
sed -e 's,@initrd_modules@,$(initrd_modules),' \
-e 's,@extra_postinstall_command@,$(extra_command),' \
-e 's,@headers_dirs@,$(headers_dirs),g' \
'$<' > '$@'
#
# Generates the kernel config file for a subarch by merging
# the arch-independent config file (arch/config),
@ -147,7 +132,7 @@ patches += $(wildcard debian/patches-arch/$(ARCH)_*)
patches := $(strip $(patches))
$(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): SOURCE_DIR=$(BUILD_DIR)/source
$(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): DIR=$(BUILD_DIR)/source-$(ARCH)-$(SUBARCH)
$(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): $(BUILD_DIR)/post-install-$(ARCH)-$(SUBARCH) $(STAMPS_DIR)/source
$(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): $(STAMPS_DIR)/source
rm -rf '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
mkdir -p '$(DIR)/debian'
@ -161,7 +146,6 @@ $(STAMPS_DIR)/source-$(ARCH)-$(SUBARCH): $(BUILD_DIR)/post-install-$(ARCH)-$(SUB
cat "$(CURDIR)/$$patch" | patch -p1; \
done; \
fi
install '$<' '$(DIR)/debian/post-install'
touch '$@'
#
# This target performs a build for a particular flavour. Note
@ -232,9 +216,10 @@ install-dummy:
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR): SOURCE_DIR=$(BUILD_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR): DIR=$(BUILD_DIR)/$@
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR): $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
install-image-$(ARCH)-$(SUBARCH)-$(FLAVOUR): $(STAMPS_DIR)/build-$(ARCH)-$(SUBARCH)-$(FLAVOUR) debian/bin/install-image
rm -rf '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
install debian/bin/install-image '$(DIR)/debian/post-install'
cd '$(DIR)'; $(setup_env) $(kpkg_image) kernel-image
cat '$(DIR)/debian/files' >> debian/files
@for i in $$(awk '{ print $$1; }' '$(DIR)/debian/files'); do \
@ -248,7 +233,8 @@ install-header-$(ARCH)-$(SUBARCH): DIR=$(BUILD_DIR)/$@
install-header-$(ARCH)-$(SUBARCH): $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)
rm -rf '$(DIR)'
cp -al '$(SOURCE_DIR)' '$(DIR)'
cd '$(DIR)'; $(setup_env) $(kpkg_header) kernel-headers
install debian/bin/install-header '$(DIR)/install-header'
cd '$(DIR)'; $(setup_env) HEADER_CLEAN_HOOK='$(CURDIR)/$(DIR)/install-header' $(kpkg_header) kernel-headers
cat '$(DIR)/debian/files' >> debian/files
@for i in $$(awk '{ print $$1; }' '$(DIR)/debian/files'); do \
echo "mv \"$(BUILD_DIR)/$$i\" .."; \