#!/bin/sh set -e CWD=`pwd` VERSION=${VERSION:-2.6.24.3} ARCH=${ARCH:-x86_64} BUILD=${BUILD:-1} PKG=/tmp/package-kernel-headers rm -rf $PKG cd /usr/src/linux-$VERSION # This was meant for 2.6.25, not 2.6.24 - see http://lkml.org/lkml/2008/3/21/450 zcat $CWD/commit-dded91611a728d65721cdab3dd41d801a356fa15.diff.gz | patch -p1 -R --verbose make headers_check || exit 1 make headers_install INSTALL_HDR_PATH=$PKG/usr # Apply the [bad] patch again to leave the source tree in a clean state zcat $CWD/commit-dded91611a728d65721cdab3dd41d801a356fa15.diff.gz | patch -p1 --verbose cd $PKG mkdir install cat $CWD/slack-desc > install/slack-desc makepkg -l y -c n ../kernel-headers-$VERSION-${ARCH}_slamd64-$BUILD.tgz