2005-05-10 04:16:53 +00:00
|
|
|
#!/bin/sh
|
2005-05-17 23:04:42 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
2005-05-10 04:16:53 +00:00
|
|
|
set -e
|
|
|
|
|
|
|
|
kbpkg=@kbpkg@
|
|
|
|
|
|
|
|
cd $DEBIAN_SRCTOP
|
|
|
|
{
|
2005-05-17 23:04:42 +00:00
|
|
|
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
|
2005-05-10 04:16:53 +00:00
|
|
|
} | cpio -pd --preserve-modification-time $OLDPWD
|
|
|
|
cd - > /dev/null
|
2005-05-17 23:04:42 +00:00
|
|
|
ln -s ../${kbpkg}/scripts .
|
2005-05-10 04:16:53 +00:00
|
|
|
|
|
|
|
remove=
|
|
|
|
cd include
|
|
|
|
for i in asm-*; do
|
|
|
|
case ${i#asm-} in
|
2005-05-17 23:04:42 +00:00
|
|
|
generic | @headers_dirs@)
|
2005-05-10 04:16:53 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
remove="$remove $i"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
${remove:+rm -r $remove}
|