wok-6.x rev 9731
linux: Fix 1. copying aufs files
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon May 09 15:54:20 2011 +0200 (2011-05-09) |
parents | 858f8a7575d9 |
children | 810ab87ba4bc |
files | linux/receipt |
line diff
1.1 --- a/linux/receipt Mon May 09 15:38:20 2011 +0200 1.2 +++ b/linux/receipt Mon May 09 15:54:20 2011 +0200 1.3 @@ -4,39 +4,60 @@ 1.4 VERSION="2.6.37" 1.5 CATEGORY="base-system" 1.6 SHORT_DESC="The Linux kernel and modules." 1.7 -DEPENDS="depmod" 1.8 -BUILD_DEPENDS="slitaz-toolchain perl git lzma patch" 1.9 MAINTAINER="devel@slitaz.org" 1.10 TARBALL="$PACKAGE-$VERSION.tar.bz2" 1.11 WEB_SITE="http://www.kernel.org/" 1.12 WGET_URL="http://www.eu.kernel.org/pub/linux/kernel/v${VERSION:0:3}/$TARBALL" 1.13 CONFIG_FILES="/lib/modules/$VERSION-slitaz/modules.dep" 1.14 1.15 +DEPENDS="depmod" 1.16 +BUILD_DEPENDS="slitaz-toolchain perl git lzma patch" 1.17 + 1.18 +# FIXME: tazwok specific code in functions 1.19 + 1.20 # Rules to configure and make the package. 1.21 compile_rules() 1.22 { 1.23 - 1.24 + cd $src 1.25 # this is code to help update the kernel version faster 1.26 #for i in $(grep -l 'WANTED="linux"' $WOK/*/receipt) 1.27 #do 1.28 # sed -i 's|VERSION="OLDVERSION"|VERSION="NEWVERSION"|g' $i 1.29 #done 1.30 - report open-bloc 1.31 1.32 + # FIXME: tazwok specific code 1.33 + #report open-bloc 1.34 + 1.35 + # Check for Aufs and cook it if unbuilt. 1.36 + echo "Checking for Aufs packages..." 1.37 _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'` 1.38 AUFSDIR=$WOK/$PACKAGE/aufs-${_AUFSVER} 1.39 - tazwok get-src aufs --target=$AUFSDIR || { report close-bloc; return 1; } 1.40 + [ -d "$AUFSDIR" ] || AUFSDIR=$WOK/$PACKAGE/source/aufs-${_AUFSVER} 1.41 + if [ ! -d "$AUFSDIR" ]; then 1.42 + if [ -x /usr/bin/cook ]; then 1.43 + # Give info an redirect to /dev/null since aufs got it own log. 1.44 + echo "Cook: aufs $_AUFSVER" 1.45 + cook aufs > /dev/null 1.46 + else [ -x /usr/bin/tazwok ] 1.47 + tazwok cook aufs 1.48 + fi 1.49 + fi 1.50 + 1.51 + # FIXME: tazwok specific code (if aufs is cooked you dont need to get-src) 1.52 + #tazwok get-src aufs --target=$AUFSDIR || { report close-bloc; return 1; } 1.53 + 1.54 + echo "Copying Aufs files and patches..." 1.55 cp -a $AUFSDIR/Documentation $AUFSDIR/fs $AUFSDIR/include $src 1.56 cp -a $AUFSDIR/*.patch $WOK/$PACKA$stuff 1.57 - cd $src 1.58 + 1.59 # SliTaz db 1.60 - [ -d $WOK/$PACKAGE/slitaz ] && rm -rf $WOK/$PACKAGE/slitaz 2> /dev/null 1.61 - mkdir $WOK/$PACKAGE/slitaz 1.62 + rm -rf $WOK/$PACKAGE/slitaz && mkdir $WOK/$PACKAGE/slitaz 1.63 echo "$WGET_URL" > $WOK/$PACKAGE/slitaz/url 1.64 cp $stuff/gztazmod.sh $stuff/list_modules.sh $WOK/$PACKAGE/slitaz 1.65 cp $stuff/bootloader.sh $WOK/$PACKAGE/slitaz 1.66 + 1.67 # Apply patches 1.68 - report step "Applying patches" 1.69 + echo "Applying patches..." 1.70 while read patch_file; do 1.71 echo "$patch_file" >> $WOK/$PACKAGE/slitaz/patches 1.72 cp $stuff/$patch_file $WOK/$PACKAGE/slitaz 1.73 @@ -60,16 +81,22 @@ 1.74 004-squashfs-add-xz-compression-support.patch 1.75 005-squashfs-add-xz-compression-configuration-option.patch 1.76 EOT 1.77 - report step "Make kernel proper and then build lguest" 1.78 + 1.79 + # FIXME: tazwok specific code 1.80 + #report step "Make kernel proper and then build lguest" 1.81 + 1.82 make mrproper 1.83 cd Documentation/lguest 1.84 make lguest || { report close-bloc; return 1; } 1.85 cd $src 1.86 1.87 - report step "Make bzImage without modules first" 1.88 + # FIXME: tazwok specific code 1.89 + #report step "Make bzImage without modules first" 1.90 + 1.91 # Build bzImage without modules first 1.92 cp -f $stuff/$PACKAGE-$VERSION-slitaz.config .config 1.93 sed -i 's/CONFIG_MODULES=y/# CONFIG_MODULES is not set/' .config 1.94 + 1.95 # We can't keep every driver in staging 1.96 sed -i -e 's/^CONFIG_RTL8192/#&/' \ 1.97 -e 's/^CONFIG_R8187SE/#&/' \ 1.98 @@ -80,7 +107,9 @@ 1.99 mv arch/x86/boot/bzImage $PWD/_pkg 1.100 mv System.map System.map-without-modules 1.101 1.102 - report step "Now build bzImage with modules" 1.103 + # FIXME: tazwok specific code 1.104 + #report step "Now build bzImage with modules" 1.105 + 1.106 # Build bzImage with modules 1.107 cp -f $stuff/$PACKAGE-$VERSION-slitaz.config .config 1.108 make oldconfig 1.109 @@ -92,12 +121,17 @@ 1.110 [ -s arch/x86/boot/bzImage ] || { report close-bloc; return 1; } 1.111 mkdir -p $PWD/_pkg/boot 2> /dev/null 1.112 mv arch/x86/boot/bzImage $PWD/_pkg/boot/vmlinuz-$VERSION-slitaz 1.113 + 1.114 + # FIXME: tazwok specific code 1.115 + #report step "Compressing all modules" 1.116 + 1.117 # Compress all modules. 1.118 - report step "Compressing all modules" 1.119 $stuff/gztazmod.sh $PWD/_pkg/lib/modules/$VERSION-slitaz 1.120 ln System.map System.map-modules 1.121 ln Module.symvers Module.symvers-modules 1.122 - report close-bloc 1.123 + 1.124 + # FIXME: tazwok specific code 1.125 + #report close-bloc 1.126 } 1.127 1.128 # Rules to gen a SliTaz package suitable for Tazpkg. 1.129 @@ -132,7 +166,7 @@ 1.130 done 1.131 # Check and echo any module in kernel .config that's not added to 1.132 # one of linux-* pkgs 1.133 -$stuff/check_modules.sh 1.134 + $stuff/check_modules.sh 1.135 } 1.136 1.137 # Pre and post install commands for Tazpkg.