wok annotate linux/receipt @ rev 7297
Add aufs. Aufs is now compile by itself like ndiswrapper-driver is. This is so the aufs source tar.gz file is not purge with tazdev everytime we need to purge it. Removed linux-aufs receipt. Updated linux, linux-source, and aufs-utils with the new changes.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Wed Nov 17 00:59:02 2010 +0000 (2010-11-17) |
parents | 5355ffc461cf |
children | db069f80c0a0 |
rev | line source |
---|---|
pankso@3 | 1 # SliTaz package receipt. |
pankso@3 | 2 |
pankso@3 | 3 PACKAGE="linux" |
slaxemulator@7131 | 4 VERSION="2.6.36" |
pankso@3 | 5 CATEGORY="base-system" |
pankso@3 | 6 SHORT_DESC="The Linux kernel and modules." |
pascal@2926 | 7 DEPENDS="depmod" |
pankso@4251 | 8 BUILD_DEPENDS="slitaz-toolchain perl git" |
pankso@3864 | 9 MAINTAINER="devel@slitaz.org" |
pankso@3 | 10 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pankso@3 | 11 WEB_SITE="http://www.kernel.org/" |
pascal@2990 | 12 WGET_URL="http://www.eu.kernel.org/pub/linux/kernel/v${VERSION:0:3}/$TARBALL" |
pascal@1909 | 13 CONFIG_FILES="/lib/modules/$VERSION-slitaz/modules.dep" |
pankso@3 | 14 |
pankso@3 | 15 # Rules to configure and make the package. |
pankso@3 | 16 compile_rules() |
pankso@3 | 17 { |
slaxemulator@7131 | 18 |
slaxemulator@7131 | 19 # this is code to help update the kernel version faster |
slaxemulator@7131 | 20 #for i in $(grep -l 'WANTED="linux"' $WOK/*/receipt) |
slaxemulator@7131 | 21 #do |
slaxemulator@7131 | 22 # sed -i 's|VERSION="OLDVERSION"|VERSION="NEWVERSION"|g' $i |
slaxemulator@7131 | 23 #done |
slaxemulator@7297 | 24 local _AUFSVER=`grep ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'` |
slaxemulator@7297 | 25 local AUFSDIR="aufs-${_AUFSVER}" |
slaxemulator@6721 | 26 TARBALL=$SOURCES_REPOSITORY/$AUFSDIR.tar.gz |
slaxemulator@7297 | 27 if [ -d $WOK/aufs/$AUFSDIR ]; then |
slaxemulator@7297 | 28 local AUFSDIR=$WOK/aufs/$AUFSDIR |
slaxemulator@7297 | 29 ln -sf $AUFSDIR aufs-${_AUFSVER} |
slaxemulator@7297 | 30 elif [ -f $TARBALL ]; then |
slaxemulator@6719 | 31 tar xzf $TARBALL |
slaxemulator@7131 | 32 cd $AUFSDIR && git checkout origin/aufs2 |
slaxemulator@7297 | 33 cd $WOK/$PACKAGE |
slaxemulator@6719 | 34 else |
slaxemulator@6719 | 35 # Aufs2 from git repository |
slaxemulator@6721 | 36 git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git $AUFSDIR |
slaxemulator@6721 | 37 tar czf $TARBALL $AUFSDIR |
slaxemulator@7297 | 38 cd $AUFSDIR && git checkout origin/aufs2 |
slaxemulator@7297 | 39 cd $WOK/$PACKAGE |
pankso@4251 | 40 fi |
slaxemulator@7297 | 41 cp -a $AUFSDIR/Documentation $AUFSDIR/fs $AUFSDIR/include $src |
slaxemulator@7297 | 42 cp -a $AUFSDIR/*.patch $WOK/$PACKAGE/stuff |
pankso@5640 | 43 # We need the real GNU patch |
pascal@5061 | 44 [ -L /usr/bin/patch ] && tazpkg get-install patch --forced |
erjo@253 | 45 cd $src |
pankso@4251 | 46 # SliTaz db |
slaxemulator@7297 | 47 [ -d slitaz ] && rm -rf slitaz 2> /dev/null |
pascal@1093 | 48 mkdir slitaz |
pascal@1093 | 49 echo "$WGET_URL" > slitaz/url |
pascal@1093 | 50 cp ../stuff/gztazmod.sh ../stuff/list_modules.sh slitaz |
pascal@4504 | 51 cp ../stuff/bootloader.sh slitaz |
pankso@5640 | 52 # Apply patches |
pascal@521 | 53 while read patch_file; do |
pascal@4003 | 54 echo "$patch_file" >> slitaz/patches |
jozee@4472 | 55 cp ../stuff/$patch_file slitaz |
pascal@1442 | 56 if [ -f done.$patch_file ]; then |
pascal@1442 | 57 echo "Skipping $patch_file" |
pascal@1442 | 58 continue |
pascal@1442 | 59 fi |
pascal@521 | 60 echo "Apply $patch_file" |
jozee@4472 | 61 patch -p1 < slitaz/$patch_file || exit 1 |
pascal@1442 | 62 touch done.$patch_file |
pascal@521 | 63 done <<EOT |
jozee@4472 | 64 $PACKAGE-diff-$VERSION.u |
jozee@4472 | 65 $PACKAGE-unlzma-$VERSION.u |
pankso@5245 | 66 $PACKAGE-header-$VERSION.u |
slaxemulator@7131 | 67 $PACKAGE-freeinitrd-$VERSION.u |
jozee@4472 | 68 aufs2-base.patch |
slaxemulator@7131 | 69 aufs2-standalone.patch |
slaxemulator@7131 | 70 aufs2-module-2.6.36.patch |
slaxemulator@7131 | 71 aufs2-2.6.36-fix.patch |
pascal@521 | 72 EOT |
pankso@3864 | 73 make mrproper |
pascal@4507 | 74 cd Documentation/lguest |
pascal@4507 | 75 make lguest || return 1 |
pascal@4507 | 76 cd ../.. |
erjo@253 | 77 cp ../stuff/$PACKAGE-$VERSION-slitaz.config .config |
erjo@253 | 78 make oldconfig |
pascal@1093 | 79 ln .config slitaz/config |
pascal@5690 | 80 make -j 4 bzImage && |
pascal@5690 | 81 make -j 4 modules && |
pascal@3919 | 82 make INSTALL_MOD_PATH=$PWD/_pkg modules_install && |
pascal@3919 | 83 make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install && |
pascal@3919 | 84 [ -s arch/x86/boot/bzImage ] |
slaxemulator@6719 | 85 # Compress all modules. |
slaxemulator@6719 | 86 $WOK/$PACKAGE/stuff/gztazmod.sh $PWD/_pkg/lib/modules/$VERSION-slitaz |
pankso@3864 | 87 } |
erjo@253 | 88 |
pankso@3 | 89 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@3 | 90 genpkg_rules() |
pankso@3 | 91 { |
pascal@521 | 92 local path |
pankso@3 | 93 mkdir $fs/boot |
pankso@5640 | 94 cp -a $src/arch/x86/boot/bzImage \ |
pankso@5640 | 95 $fs/boot/vmlinuz-$VERSION-slitaz |
pankso@3 | 96 # Compress all modules. |
slaxemulator@6719 | 97 #./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz |
pascal@521 | 98 path=$fs/lib/modules/$VERSION-slitaz/kernel |
pascal@521 | 99 mkdir -p $path |
pankso@5640 | 100 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* \ |
pankso@5640 | 101 $fs/lib/modules/$VERSION-slitaz |
pankso@5640 | 102 # Get the base modules |
pascal@886 | 103 export src |
pascal@886 | 104 export _pkg |
pascal@3920 | 105 $src/slitaz/list_modules.sh \ |
pascal@3920 | 106 $(cat stuff/modules-$VERSION.list) > $src/modules.list |
pankso@3864 | 107 while read module; do |
pascal@521 | 108 dir=$(dirname $module) |
pankso@535 | 109 [ -d $path/$dir ] || mkdir -p $path/$dir |
pankso@535 | 110 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir |
pascal@886 | 111 done < $src/modules.list |
pascal@397 | 112 # Remove unresolved links |
pascal@397 | 113 rm -f $fs/lib/modules/$VERSION-slitaz/build |
pascal@397 | 114 rm -f $fs/lib/modules/$VERSION-slitaz/source |
pascal@886 | 115 # Cook all packages with a kernel module |
pascal@886 | 116 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt) |
pascal@886 | 117 do |
pascal@886 | 118 echo tazwok cook ${i%/receipt} |
pankso@871 | 119 done |
pankso@5640 | 120 # Check and echo any module in kernel .config that's not added to |
pankso@5640 | 121 # one of linux-* pkgs |
jozee@4472 | 122 ./stuff/check_modules.sh |
pankso@3 | 123 } |
pankso@3 | 124 |
pankso@3 | 125 # Pre and post install commands for Tazpkg. |
pankso@3 | 126 post_install() |
pankso@3 | 127 { |
pascal@521 | 128 echo "Processing post-install commands..." |
pascal@2926 | 129 chroot "$1/" depmod -a $VERSION-slitaz |
pankso@5640 | 130 # GRUB stuff. |
pankso@1154 | 131 if [ -f "$1/boot/grub/menu.lst" ]; then |
pankso@4056 | 132 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1` |
pankso@4056 | 133 grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1` |
pankso@3864 | 134 # Add new kernel entry in case of upgrade for installed system. |
pankso@4056 | 135 if ! grep -q $PACKAGE-$VERSION-slitaz $1/boot/grub/menu.lst; then |
pankso@4056 | 136 cat >> $1/boot/grub/menu.lst << EOT |
pankso@4056 | 137 |
pankso@4056 | 138 title SliTaz GNU/Linux (Kernel $VERSION-slitaz) |
pankso@4056 | 139 $grub_dev |
pankso@4056 | 140 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev |
pankso@4056 | 141 EOT |
pankso@4056 | 142 fi |
pankso@4056 | 143 # Display information message. |
pankso@4056 | 144 cat <<EOT |
pankso@4056 | 145 ---- |
pankso@4056 | 146 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst: |
pankso@1154 | 147 |
pankso@1154 | 148 title SliTaz GNU/Linux (Kernel $VERSION-slitaz) |
pankso@1154 | 149 $grub_dev |
pankso@4056 | 150 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev |
pascal@886 | 151 ---- |
pascal@886 | 152 EOT |
pankso@1154 | 153 fi |
pankso@3 | 154 } |
pankso@4251 | 155 |
pankso@4251 | 156 clean_wok() |
pankso@4251 | 157 { |
slaxemulator@7131 | 158 #rm -rf aufs2 |
slaxemulator@7131 | 159 rm stuff/aufs2-base* |
slaxemulator@7131 | 160 rm stuff/aufs2-standalone* |
slaxemulator@7297 | 161 #rm stuff/aufs2-kbuild* |
pankso@5640 | 162 rm -rf stuff/tmp |
pankso@4251 | 163 } |