# HG changeset patch # User Christopher Rogers # Date 1306434381 0 # Node ID cc1782ebaa812615148c97ab264dda5aa2de722b # Parent 7d021a3625d2c2b97b9958a4627b0be9030b2365 linux-libre: Fixed to only use tazwok if cook doesn't exist. Fixed also some typos. diff -r 7d021a3625d2 -r cc1782ebaa81 linux-libre/receipt --- a/linux-libre/receipt Fri May 27 00:23:00 2011 +0200 +++ b/linux-libre/receipt Thu May 26 18:26:21 2011 +0000 @@ -4,8 +4,6 @@ VERSION="2.6.37-libre" CATEGORY="base-system" SHORT_DESC="The Linux Libre kernel and modules." -DEPENDS="depmod" -BUILD_DEPENDS="slitaz-toolchain perl git lzma patch" MAINTAINER="gokhlayeh@slitaz.org" PROVIDE="linux" SOURCE="linux" @@ -14,30 +12,48 @@ WGET_URL="http://www.fsfla.org/svnwiki/selibre/linux-libre/download/releases/$VERSION/$TARBALL" CONFIG_FILES="/lib/modules/$VERSION-slitaz/modules.dep" +DEPENDS="depmod" +BUILD_DEPENDS="slitaz-toolchain perl git lzma patch" + # Rules to configure and make the package. compile_rules() { - + cd $src # this is code to help update the kernel version faster #for i in $(grep -l 'WANTED="linux"' $WOK/*/receipt) #do # sed -i 's|VERSION="OLDVERSION"|VERSION="NEWVERSION"|g' $i #done + [ -x /usr/bin/tazwok -a ! -x /usr/bin/cook ] && report open-bloc + # Check for Aufs and cook it if unbuilt. + echo "Checking for Aufs packages..." _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'` - AUFSDIR=$WOK/$PACKAGE/aufs-${_AUFSVER} - if [ -x /usr/bin/tazwok ]; then + if [ -x /usr/bin/cook ]; then + # Give info an redirect to /dev/null since aufs got it own log. + AUFSDIR=$WOK/aufs/source/aufs-${_AUFSVER} + [ -d "$AUFSDIR" ] && rm -rf $AUFSDIR + echo "Cook: aufs $_AUFSVER" + cook aufs > /dev/null + elif [ -x /usr/bin/tazwok ]; then + # we just need aufs source. Also cooking now is a bad idea since it + # needs linux-module-headers. The one your cooking not the one from the web. + AUFSDIR=$WOK/aufs/aufs-${_AUFSVER} + [ -d "$AUFSDIR" ] && rm -rf $AUFSDIR tazwok get-src aufs --target=$AUFSDIR || { report close-bloc; return 1; } fi + + echo "Copying Aufs files and patches..." cp -a $AUFSDIR/Documentation $AUFSDIR/fs $AUFSDIR/include $src - cp -a $AUFSDIR/*.patch $WOK/$PACKA$stuff - cd $src + cp -a $AUFSDIR/*.patch $stuff + # SliTaz db [ -d $WOK/$PACKAGE/slitaz ] && rm -rf $WOK/$PACKAGE/slitaz 2> /dev/null mkdir $WOK/$PACKAGE/slitaz echo "$WGET_URL" > $WOK/$PACKAGE/slitaz/url cp $stuff/gztazmod.sh $stuff/list_modules.sh $WOK/$PACKAGE/slitaz cp $stuff/bootloader.sh $WOK/$PACKAGE/slitaz + # Apply patches echo "Applying patches" while read patch_file; do @@ -48,7 +64,11 @@ continue fi echo "Apply $patch_file" - patch -p1 < $WOK/$PACKAGE/slitaz/$patch_file || exit 1 + if [ -x /usr/bin/cook ]; then + patch -p1 < $WOK/$PACKAGE/slitaz/$patch_file || return 1 + elif [ -x /usr/bin/tazwok ]; then + patch -p1 < $WOK/$PACKAGE/slitaz/$patch_file || { report close-bloc; return 1; } + fi touch done.$patch_file done < /dev/null - mv arch/x86/boot/bzImage $PWD/_pkg/boot/vmlinuz-$VERSION-slitaz + make INSTALL_MOD_PATH=$DESTDIR modules_install && + make INSTALL_HDR_PATH=$DESTDIR/usr headers_install && + #[ -s arch/x86/boot/bzImage ] || { report close-bloc; return 1; } + mkdir -p $DESTDIR/boot 2> /dev/null + mv arch/x86/boot/bzImage $DESTDIR/boot/vmlinuz-$VERSION-slitaz + # Compress all modules. echo "Compressing all modules" - $stuff/gztazmod.sh $PWD/_pkg/lib/modules/$VERSION-slitaz + $stuff/gztazmod.sh $DESTDIR/lib/modules/$VERSION-slitaz ln System.map System.map-modules ln Module.symvers Module.symvers-modules + [ -x /usr/bin/tazwok -a ! -x /usr/bin/cook ] && report close-bloc } # Rules to gen a SliTaz package suitable for Tazpkg. @@ -117,8 +147,8 @@ export src export _pkg mkdir $WOK/$PACKAGE/tmp - $WOK/$PACKA$stuff/list_modules.sh \ - $(cat stuff/modules-$VERSION.list) > $WOK/$PACKAGE/tmp/modules.list + $stuff/list_modules.sh \ + $(cat $stuff/modules-$VERSION.list) > $WOK/$PACKAGE/tmp/modules.list while read module; do dir=$(dirname $module) [ -d $path/$dir ] || mkdir -p $path/$dir