wok annotate linux/receipt @ rev 886
Up: linux (2.5.25.5)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jun 07 22:04:11 2008 +0000 (2008-06-07) |
parents | 7a8f9456adc2 |
children | da3467381855 |
rev | line source |
---|---|
pankso@3 | 1 # SliTaz package receipt. |
pankso@3 | 2 |
pankso@3 | 3 PACKAGE="linux" |
pascal@886 | 4 VERSION="2.6.25.5" |
pankso@3 | 5 CATEGORY="base-system" |
pankso@3 | 6 SHORT_DESC="The Linux kernel and modules." |
pankso@289 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pankso@3 | 8 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pankso@3 | 9 WEB_SITE="http://www.kernel.org/" |
pankso@3 | 10 WGET_URL="http://www.eu.kernel.org/pub/linux/kernel/v2.6/$TARBALL" |
pankso@3 | 11 |
pankso@3 | 12 # Rules to configure and make the package. |
pankso@3 | 13 compile_rules() |
pankso@3 | 14 { |
erjo@253 | 15 cd $src |
pascal@886 | 16 # lzma and misc patches from pascal |
pascal@521 | 17 while read patch_file; do |
pascal@521 | 18 echo "Apply $patch_file" |
pascal@881 | 19 patch -p1 < ../stuff/$patch_file || return 1 |
pascal@521 | 20 done <<EOT |
pascal@521 | 21 $PACKAGE-lzma-$VERSION.u |
pascal@886 | 22 $PACKAGE-utf8-$VERSION.u |
pascal@886 | 23 $PACKAGE-diff-$VERSION.u |
pascal@521 | 24 EOT |
erjo@253 | 25 make mrproper |
erjo@253 | 26 cp ../stuff/$PACKAGE-$VERSION-slitaz.config .config |
erjo@253 | 27 make oldconfig |
erjo@253 | 28 make bzImage |
erjo@253 | 29 make modules |
erjo@253 | 30 make INSTALL_MOD_PATH=$PWD/_pkg modules_install |
pascal@886 | 31 make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install |
erjo@253 | 32 } |
erjo@253 | 33 |
pankso@3 | 34 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@3 | 35 genpkg_rules() |
pankso@3 | 36 { |
pascal@521 | 37 local path |
pankso@3 | 38 mkdir $fs/boot |
pascal@214 | 39 cp -a $src/arch/x86/boot/bzImage $fs/boot/vmlinuz-$VERSION-slitaz |
pascal@881 | 40 rdev $fs/boot/vmlinuz-$VERSION-slitaz /dev/ram0 |
pankso@3 | 41 # Compress all modules. |
pankso@3 | 42 # Package module-init-tools is compiled with zlib support. |
pankso@3 | 43 # |
pascal@521 | 44 ./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz |
pascal@521 | 45 path=$fs/lib/modules/$VERSION-slitaz/kernel |
pascal@521 | 46 mkdir -p $path |
pascal@521 | 47 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* $fs/lib/modules/$VERSION-slitaz |
pascal@886 | 48 cp ./stuff/list_modules.sh $src |
pascal@886 | 49 export src |
pascal@886 | 50 export _pkg |
pascal@886 | 51 $src/list_modules.sh $(cat stuff/modules-$VERSION.list) > $src/modules.list |
pascal@521 | 52 while read module; do |
pascal@521 | 53 dir=$(dirname $module) |
pankso@535 | 54 [ -d $path/$dir ] || mkdir -p $path/$dir |
pankso@535 | 55 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir |
pascal@886 | 56 done < $src/modules.list |
pascal@397 | 57 # Remove unresolved links |
pascal@397 | 58 rm -f $fs/lib/modules/$VERSION-slitaz/build |
pascal@397 | 59 rm -f $fs/lib/modules/$VERSION-slitaz/source |
pascal@886 | 60 # Package all linux pkgs |
pascal@886 | 61 for i in $(cd $WOK; ls -d linux-*) |
pankso@871 | 62 do |
pascal@886 | 63 tazwok genpkg $i |
pascal@886 | 64 done |
pascal@886 | 65 # Cook all packages with a kernel module |
pascal@886 | 66 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt) |
pascal@886 | 67 do |
pascal@886 | 68 echo tazwok cook ${i%/receipt} |
pankso@871 | 69 done |
pankso@3 | 70 } |
pankso@3 | 71 |
pankso@3 | 72 # Pre and post install commands for Tazpkg. |
pankso@3 | 73 # GRUB stuf. |
pankso@3 | 74 post_install() |
pankso@3 | 75 { |
pascal@521 | 76 echo "Processing post-install commands..." |
pascal@886 | 77 depmod -a -b "$1/" $VERSION-slitaz |
pascal@886 | 78 cat <<EOT |
pascal@886 | 79 ---- |
pascal@886 | 80 If you have GRUB installed, you can add tree lines to boot SliTaz. |
pascal@886 | 81 Example /boot/grub/menu.lst |
pascal@886 | 82 |
pankso@3 | 83 title SliTaz GNU/Linux (Kernel $VERSION-slitaz) |
pankso@3 | 84 root(hd0,0) |
pascal@886 | 85 kernel /boot/vmlinuz-$VERSION-slitaz root=/dev/hda1 vga=771 |
pascal@886 | 86 ---- |
pascal@886 | 87 EOT |
pankso@3 | 88 } |