# HG changeset patch # User Pascal Bellard # Date 1236526872 0 # Node ID 9a58fb34a5ac4f1a355a7efb2e0be0c6bb9a2b5d # Parent 2f08b20301f06944d31cc2ea116bf7d67701e5ca Add linux-tickless diff -r 2f08b20301f0 -r 9a58fb34a5ac linux-tickless/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linux-tickless/receipt Sun Mar 08 15:41:12 2009 +0000 @@ -0,0 +1,107 @@ +# SliTaz package receipt. + +PACKAGE="linux-tickless" +VERSION="2.6.25.5" +CATEGORY="base-system" +SHORT_DESC="The Linux kernel and modules." +BUILD_DEPENDS="slitaz-toolchain perl" +MAINTAINER="pascal.bellard@slitaz.org" +SOURCE="linux" +TARBALL="$SOURCE-$VERSION.tar.bz2" +WEB_SITE="http://www.kernel.org/" +WGET_URL="http://www.eu.kernel.org/pub/linux/kernel/v2.6/$TARBALL" +CONFIG_FILES="/lib/modules/$VERSION-slitaz/modules.dep" +PROVIDE="linux" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + rm -rf slitaz 2> /dev/null + mkdir slitaz + echo "$WGET_URL" > slitaz/url + cp $WOK/linux/stuff/gztazmod.sh $WOK/linux/stuff/list_modules.sh slitaz + # lzma and misc patches from pascal + while read patch_file; do + if [ -f done.$patch_file ]; then + echo "Skipping $patch_file" + continue + fi + echo "Apply $patch_file" + patch -p1 < $WOK/linux/stuff/$patch_file || return 1 + echo "$patch_file" >> slitaz/patches + cp $WOK/linux/stuff/$patch_file slitaz/$patch_file + touch done.$patch_file + done < $src/modules.list + while read module; do + dir=$(dirname $module) + [ -d $path/$dir ] || mkdir -p $path/$dir + cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir + done < $src/modules.list + # Remove unresolved links + rm -f $fs/lib/modules/$VERSION-slitaz/build + rm -f $fs/lib/modules/$VERSION-slitaz/source +} + +# Pre and post install commands for Tazpkg. +# GRUB stuf. +post_install() +{ + echo "Processing post-install commands..." + depmod -a -b "$1/" $VERSION-slitaz + if [ -f "$1/boot/grub/menu.lst" ]; then + root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/'` + grub_dev=`cat $1/boot/grub/menu.lst | grep "root ("` + # Add new kernel entry in case of upgrade for installed system. + cat >> $1/boot/grub/menu.lst << EOT + +title SliTaz GNU/Linux (Kernel $VERSION-slitaz) +$grub_dev + kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev +EOT + # Display information message. + cat <