From 3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc Mon Sep 17 00:00:00 2001 From: rhatto Date: Mon, 31 Jul 2006 20:45:44 +0000 Subject: initial import git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1 370017ae-e619-0410-ac65-c121f96126d4 --- kernel-satan/kernel-satan.SlackBuild | 119 +++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100755 kernel-satan/kernel-satan.SlackBuild (limited to 'kernel-satan/kernel-satan.SlackBuild') diff --git a/kernel-satan/kernel-satan.SlackBuild b/kernel-satan/kernel-satan.SlackBuild new file mode 100755 index 00000000..5f5d0744 --- /dev/null +++ b/kernel-satan/kernel-satan.SlackBuild @@ -0,0 +1,119 @@ +#!/bin/bash +# +# slackbuild for kernel-satan +# + +CWD="`pwd`" + +if [ -f "/etc/slackbuildrc" ]; then + source /etc/slackbuildrc +fi + +if [ -f "~/.slackbuildrc" ]; then + source ~/.slackbuildrc +fi + +PACKAGE="kernel-satan" +KERNEL_VERSION="2.6.16" +EXTRAVERSION="25" +ARCH="x86_64" +BUILD="1rha" +PATCHSET="vs2.0.2-rc22" +PATCH_VERSION="2.6.16.20-$PATCHSET" +TMP=${TMP:=/tmp} +SRC_DIR=${SRC:=$CWD} + +if [ ! -z "$EXTRAVERSION" ]; then + KERNEL_VERSION=$KERNEL_VERSION.$EXTRAVERSION +fi + +RTOOL="wget" +KERNEL="linux-$KERNEL_VERSION.tar.bz2" +PATCH="patch-$PATCH_VERSION.diff" +KERNEL_URL="http://www.kernel.org/pub/linux/kernel/v2.6/$KERNEL" +PATCH_URL="http://vserver.13thfloor.at/Experimental/$PATCH" +SRC_DIR="$SRC_DIR/kernel" + +mkdir -p $SRC_DIR + +if [ "$RTOOL" == "wget" ]; then + + if [ ! -f "$SRC_DIR/$KERNEL" ]; then + rm -f $SRC_DIR/$KERNEL.sign + wget "$KERNEL_URL" -O "$SRC_DIR/$KERNEL" + wget "$KERNEL_URL.sign" -O "$SRC_DIR/$KERNEL.sign" + fi + + if [ ! -f "$SRC_DIR/$PATCH" ]; then + wget "$PATCH_URL" -O "$SRC_DIR/$PATCH" + fi + +fi + +TMP="$TMP/$PACKAGE" +mkdir -p $TMP +cd $TMP + +rm -rf linux-$KERNEL_VERSION* +tar jxvf $SRC_DIR/$KERNEL + +if [ ! -z "$PATCHSET" ]; then + mv linux-$KERNEL_VERSION linux-$KERNEL_VERSION-$PATCHSET + KERNEL_VERSION="$KERNEL_VERSION-$PATCHSET" +fi + +cp $CWD/config-$KERNEL_VERSION linux-$KERNEL_VERSION/.config +cd linux-$KERNEL_VERSION + +patch -p1 < $SRC_DIR/$PATCH + +if [ ! -z "$EXTRAVERSION" ] && [ ! -z "$PATCHSET" ]; then + sed -e "s/^EXTRAVERSION =*$/EXTRAVERSION = \.$EXTRAVERSION-$PATCHSET/" Makefile > Makefile.tmp +elif [ ! -z "$PATCHSET" ]; then + sed -e "s/^EXTRAVERSION =*$/EXTRAVERSION = -$PATCHSET/" Makefile > Makefile.tmp +fi +mv Makefile.tmp Makefile + +make oldconfig +time make + +# make the package + +PKG="$TMP/package-$PACKAGE" + +mkdir -p $PKG/{install,boot,usr/doc} + +cp System.map $PKG/boot/System.map-$KERNEL_VERSION +cp .config $PKG/boot/config-$KERNEL_VERSION +cp arch/$ARCH/boot/bzImage $PKG/boot/vmlinuz-$KERNEL_VERSION + +cat << EOF > $PKG/install/slack-desc +kernel-satan: kernel-satan (kernel for sarava.org's satangoss machine) +kernel-satan: +kernel-satan: +kernel-satan: +kernel-satan: +kernel-satan: +kernel-satan: +kernel-satan: +kernel-satan: +kernel-satan: +kernel-satan: +EOF + +VERSION="`echo $KERNEL_VERSION | sed -e 's/-/_/g'`" + +# docs +mkdir -p $PKG/usr/doc/$PACKAGE-$VERSION +for file in COPYING CREDITS MAINTAINERS README REPORTING-BUGS; do + cp $file* $PKG/usr/doc/$PACKAGE-$VERSION/ +done + +cd $PKG + +( cd boot && ln -s vmlinuz-$KERNEL_VERSION vmlinuz ) +( cd boot && ln -s config-$KERNEL_VERSION config ) +( cd boot && ln -s System.map-$KERNEL_VERSION System.map) + +makepkg -c y -l y $TMP/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz + -- cgit v1.2.3