linux/debian/templates/header-install.in

34 lines
807 B
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
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}