| 1 |
#!/bin/sh
|
| 2 |
#
|
| 3 |
# This is the make-kpkg hook file, which runs when make-kpkg is invoked
|
| 4 |
# (from debian/rules) to create the flavour-independent kernel-headers
|
| 5 |
# package. Two major tasks which it performs are a) copying the extra
|
| 6 |
# files into the temporary kernel-headers directory and b) removing
|
| 7 |
# unneeded include/asm-* directories.
|
| 8 |
#
|
| 9 |
set -e
|
| 10 |
|
| 11 |
kbpkg=@kbpkg@
|
| 12 |
|
| 13 |
cd $DEBIAN_SRCTOP
|
| 14 |
{
|
| 15 |
find . -path './scripts/*' -prune -o \
|
| 16 |
-path './Documentation/*' -prune -o \
|
| 17 |
-path './debian/*' -prune -o \
|
| 18 |
-type f \( -name Makefile -o -name 'Kconfig*' \) -print
|
| 19 |
for i in @headers_extra@; do
|
| 20 |
echo "${i}"
|
| 21 |
done
|
| 22 |
} | cpio -pd --preserve-modification-time $OLDPWD
|
| 23 |
cd - > /dev/null
|
| 24 |
ln -s ../${kbpkg}/scripts .
|
| 25 |
|
| 26 |
remove=
|
| 27 |
cd include
|
| 28 |
for i in asm-*; do
|
| 29 |
case ${i#asm-} in
|
| 30 |
generic | @headers_dirs@)
|
| 31 |
;;
|
| 32 |
*)
|
| 33 |
remove="$remove $i"
|
| 34 |
;;
|
| 35 |
esac
|
| 36 |
done
|
| 37 |
${remove:+rm -r $remove}
|