wok-next annotate linux/receipt @ rev 2074
Add: xfce-mcs-manager*, xfce-mcs-plugins, xfce-utils
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Fri Jan 23 23:08:07 2009 +0100 (2009-01-23) |
parents | e64f8e87ea6d |
children | d1f8fd6f6efe |
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@1154 | 7 BUILD_DEPENDS="slitaz-toolchain perl" |
pankso@289 | 8 MAINTAINER="pascal.bellard@slitaz.org" |
pankso@3 | 9 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pankso@3 | 10 WEB_SITE="http://www.kernel.org/" |
pankso@3 | 11 WGET_URL="http://www.eu.kernel.org/pub/linux/kernel/v2.6/$TARBALL" |
pascal@1909 | 12 CONFIG_FILES="/lib/modules/$VERSION-slitaz/modules.dep" |
pankso@3 | 13 |
pankso@3 | 14 # Rules to configure and make the package. |
pankso@3 | 15 compile_rules() |
pankso@3 | 16 { |
erjo@253 | 17 cd $src |
pascal@1093 | 18 mkdir slitaz |
pascal@1093 | 19 echo "$WGET_URL" > slitaz/url |
pascal@1093 | 20 cp ../stuff/gztazmod.sh ../stuff/list_modules.sh slitaz |
pascal@886 | 21 # lzma and misc patches from pascal |
pascal@521 | 22 while read patch_file; do |
pascal@1442 | 23 if [ -f done.$patch_file ]; then |
pascal@1442 | 24 echo "Skipping $patch_file" |
pascal@1442 | 25 continue |
pascal@1442 | 26 fi |
pascal@521 | 27 echo "Apply $patch_file" |
pascal@881 | 28 patch -p1 < ../stuff/$patch_file || return 1 |
pascal@1093 | 29 echo "$patch_file" >> slitaz/patches |
pascal@1093 | 30 cp ../stuff/$patch_file slitaz/$patch_file |
pascal@1442 | 31 touch done.$patch_file |
pascal@521 | 32 done <<EOT |
pascal@521 | 33 $PACKAGE-lzma-$VERSION.u |
pascal@886 | 34 $PACKAGE-utf8-$VERSION.u |
pascal@886 | 35 $PACKAGE-diff-$VERSION.u |
pascal@905 | 36 $PACKAGE-rootdev.u |
pascal@521 | 37 EOT |
erjo@253 | 38 make mrproper |
erjo@253 | 39 cp ../stuff/$PACKAGE-$VERSION-slitaz.config .config |
erjo@253 | 40 make oldconfig |
pascal@1093 | 41 ln .config slitaz/config |
erjo@253 | 42 make bzImage |
erjo@253 | 43 make modules |
erjo@253 | 44 make INSTALL_MOD_PATH=$PWD/_pkg modules_install |
pascal@886 | 45 make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install |
erjo@253 | 46 } |
erjo@253 | 47 |
pankso@3 | 48 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@3 | 49 genpkg_rules() |
pankso@3 | 50 { |
pascal@521 | 51 local path |
pankso@3 | 52 mkdir $fs/boot |
pascal@214 | 53 cp -a $src/arch/x86/boot/bzImage $fs/boot/vmlinuz-$VERSION-slitaz |
pankso@3 | 54 # Compress all modules. |
pankso@3 | 55 # Package module-init-tools is compiled with zlib support. |
pankso@3 | 56 # |
pascal@521 | 57 ./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz |
pascal@521 | 58 path=$fs/lib/modules/$VERSION-slitaz/kernel |
pascal@521 | 59 mkdir -p $path |
pascal@521 | 60 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* $fs/lib/modules/$VERSION-slitaz |
pascal@886 | 61 cp ./stuff/list_modules.sh $src |
pascal@886 | 62 export src |
pascal@886 | 63 export _pkg |
pascal@886 | 64 $src/list_modules.sh $(cat stuff/modules-$VERSION.list) > $src/modules.list |
pascal@521 | 65 while read module; do |
pascal@521 | 66 dir=$(dirname $module) |
pankso@535 | 67 [ -d $path/$dir ] || mkdir -p $path/$dir |
pankso@535 | 68 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir |
pascal@886 | 69 done < $src/modules.list |
pascal@397 | 70 # Remove unresolved links |
pascal@397 | 71 rm -f $fs/lib/modules/$VERSION-slitaz/build |
pascal@397 | 72 rm -f $fs/lib/modules/$VERSION-slitaz/source |
pascal@886 | 73 # Package all linux pkgs |
pascal@886 | 74 for i in $(cd $WOK; ls -d linux-*) |
pankso@871 | 75 do |
pascal@886 | 76 tazwok genpkg $i |
pascal@886 | 77 done |
pascal@886 | 78 # Cook all packages with a kernel module |
pascal@886 | 79 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt) |
pascal@886 | 80 do |
pascal@886 | 81 echo tazwok cook ${i%/receipt} |
pankso@871 | 82 done |
pankso@3 | 83 } |
pankso@3 | 84 |
pankso@3 | 85 # Pre and post install commands for Tazpkg. |
pankso@3 | 86 # GRUB stuf. |
pankso@3 | 87 post_install() |
pankso@3 | 88 { |
pascal@521 | 89 echo "Processing post-install commands..." |
pascal@886 | 90 depmod -a -b "$1/" $VERSION-slitaz |
pankso@1154 | 91 if [ -f "$1/boot/grub/menu.lst" ]; then |
pankso@1154 | 92 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/'` |
pankso@1154 | 93 grub_dev=`cat $1/boot/grub/menu.lst | grep "root ("` |
pankso@1154 | 94 # Add new kernel entry in case of upgrade for installed system. |
pankso@1154 | 95 cat >> $1/boot/grub/menu.lst << EOT |
pankso@1154 | 96 |
pankso@1154 | 97 title SliTaz GNU/Linux (Kernel $VERSION-slitaz) |
pankso@1154 | 98 $grub_dev |
pankso@1154 | 99 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev |
pankso@1154 | 100 EOT |
pankso@1154 | 101 # Display information message. |
pankso@1154 | 102 cat <<EOT |
pascal@886 | 103 ---- |
pankso@1154 | 104 GRUB is installed, these tree lines has been added to the menu.lst: |
pascal@886 | 105 |
pankso@3 | 106 title SliTaz GNU/Linux (Kernel $VERSION-slitaz) |
pankso@1154 | 107 $grub_dev |
pankso@1154 | 108 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev |
pascal@886 | 109 ---- |
pascal@886 | 110 EOT |
pankso@1154 | 111 fi |
pankso@3 | 112 } |