30 lines
746 B
Bash
30 lines
746 B
Bash
#!/bin/bash
|
|
#
|
|
# 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. The major tasks it performs is removing unneeded
|
|
# include/asm-* directories.
|
|
#
|
|
set -e
|
|
|
|
# The scripts/ directory should be supplied for each flavour, since some
|
|
# archs do some *very* strange things...
|
|
rm -rf scripts
|
|
|
|
# XXX: once we're using a linux-headers-$(version)-$(debnum) that's Arch: all,
|
|
# we'll want to drop this bit of code. The asm-* directories should remain.
|
|
DIRS="generic $(for i in $KERNEL_HEADER_DIRS; do echo -n '|' $i; done)"
|
|
|
|
rm -f include/asm
|
|
eval "
|
|
for i in include/asm-*; do
|
|
case \${i#include/asm-} in
|
|
$DIRS)
|
|
;;
|
|
*)
|
|
rm -rf "\$i"
|
|
;;
|
|
esac
|
|
done
|
|
"
|