linux/header-install.in

38 lines
864 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
kbpkg=@kbpkg@
cd $DEBIAN_SRCTOP
{
find . -path './scripts/*' -prune -o \
-path './Documentation/*' -prune -o \
-path './debian/*' -prune -o \
-type f \( -name Makefile -o -name 'Kconfig*' \) -print
for i in @headers_extra@; do
echo "${i}"
done
} | cpio -pd --preserve-modification-time $OLDPWD
cd - > /dev/null
ln -s ../${kbpkg}/scripts .
remove=
cd include
for i in asm-*; do
case ${i#asm-} in
generic | @headers_dirs@)
;;
*)
remove="$remove $i"
;;
esac
done
${remove:+rm -r $remove}