#!/bin/sh set -e CWD=`pwd` VERSION=${VERSION:-2.6.27.7} ARCH=${ARCH:-x86_64} BUILD=${BUILD:-1} PKG=/tmp/package-kernel-headers rm -rf $PKG cd /usr/src/linux-$VERSION make headers_check || exit 1 make headers_install INSTALL_HDR_PATH=$PKG/usr cd $PKG mkdir install cat $CWD/slack-desc > install/slack-desc makepkg -l y -c n ../kernel-headers-$VERSION-${ARCH}_slamd64-$BUILD.tgz