1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#!/bin/sh
set -e
log_debug() {
echo "Debug: piuparts extra for package $PIUPARTS_OBJECTS"
}
if [ "$PIUPARTS_PHASE" = "install" ]; then
case ${PIUPARTS_OBJECTS%%=*} in
*dkms)
log_debug
# Install kernel headers, so that dkms tries to build a module
HEADERS=linux-headers
FLAVOR=unknown
FLAVOR_i386=686-pae
case $PIUPARTS_DISTRIBUTION in
lenny*|squeeze*)
HEADERS=linux-headers-2.6
FLAVOR_i386=686
;;
esac
case $(dpkg --print-architecture) in
amd64)
FLAVOR=amd64
;;
i386)
FLAVOR=$FLAVOR_i386
;;
esac
apt-get -y install $HEADERS-$FLAVOR
;;
esac
fi
|