linux/debian/templates/header-install.in

43 lines
1.1 KiB
Bash

#!/bin/sh
#
# This is the make-kpkg hook file, which runs when make-kpkg is invoked
# (from debian/rules) to create the flavour-independent kernel-headers
# package. Two major tasks which it performs are a) copying the extra
# files into the temporary kernel-headers directory and b) removing
# unneeded include/asm-* directories.
#
set -e
cd @ksource_dir@
{
find . -path './Documentation/*' -prune -o \
-path './debian/*' -prune -o -type f \
\( -name Makefile -o -name 'Kconfig*' -o -path './scripts/*' \) -print
#
# The command below will include all the asm-offsets.s files, which have
# have been linked into the linux-headers build directory during the
# buildng of the images.
#
find arch -name 'asm-offsets.s'
#
# And we need to include all the extra files too
#
for i in @headers_extra@; do
echo "${i}"
done
} | cpio -pd --preserve-modification-time $OLDPWD
cd - > /dev/null
remove=
cd include
for i in asm-*; do
case ${i#asm-} in
generic | @headers_dirs@)
;;
*)
remove="$remove $i"
;;
esac
done
${remove:+rm -r $remove}