wok annotate linux64/receipt @ rev 13438

Up: claws-mail-notification (0.30)
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sun Oct 07 01:20:11 2012 +0200 (2012-10-07)
parents
children edd6117a0e47
rev   line source
pankso@12285 1 # SliTaz package receipt.
pankso@12285 2
pankso@12285 3 PACKAGE="linux64"
pankso@12285 4 VERSION="3.2.14"
pankso@12285 5 KBASEVER="${VERSION:0:3}"
pankso@12285 6 CATEGORY="base-system"
pankso@12285 7 SHORT_DESC="The Linux 64 bits kernel and modules."
pankso@12285 8 MAINTAINER="devel@slitaz.org"
pankso@12285 9 WEB_SITE="http://www.kernel.org/"
pankso@12285 10 WANTED="linux"
pankso@12285 11 PROVIDE="linux"
pankso@12285 12 CONFIG_FILES="/lib/modules/$KBASEVER-slitaz/modules.dep"
pankso@12285 13
pankso@12285 14 DEPENDS="depmod"
pankso@12285 15
pankso@12285 16 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@12285 17 genpkg_rules()
pankso@12285 18 {
pankso@12285 19 local path
pankso@12285 20 _pkg=$_pkg/linux64
pankso@12285 21 cp -a $_pkg/boot $fs
pankso@12285 22 # Compress all modules.
pankso@12285 23 #$wanted_stuff/gztazmod.sh $_pkg/lib/modules/$KBASEVER-slitaz
pankso@12285 24 path=$fs/lib/modules/$KBASEVER-slitaz/kernel
pankso@12285 25 mkdir -p $path
pankso@12285 26 cp -a $_pkg/lib/modules/$KBASEVER-slitaz/mo* \
pankso@12285 27 $fs/lib/modules/$KBASEVER-slitaz
pankso@12285 28 # Get the base modules
pankso@12285 29 export src
pankso@12285 30 export _pkg
pankso@12285 31 mkdir -p $WOK/$PACKAGE/source/tmp
pankso@12285 32 $wanted_stuff/list_modules.sh \
pankso@12285 33 $(cat $wanted_stuff/modules.list) > $WOK/$PACKAGE/source/tmp/modules.list
pankso@12285 34 while read module; do
pankso@12285 35 dir=$(dirname $module)
pankso@12285 36 [ -d $path/$dir ] || mkdir -p $path/$dir
pankso@12285 37 cp -a $_pkg/lib/modules/$KBASEVER-slitaz/kernel/$module $path/$dir
pankso@12285 38 done < $WOK/$PACKAGE/source/tmp/modules.list
pankso@12285 39 # Remove unresolved links
pankso@12285 40 rm -f $fs/lib/modules/$KBASEVER-slitaz/build
pankso@12285 41 rm -f $fs/lib/modules/$KBASEVER-slitaz/source
pankso@12285 42 # Cook all packages with a kernel module
pankso@12285 43 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt)
pankso@12285 44 do
pankso@12285 45 echo tazwok cook ${i%/receipt}
pankso@12285 46 done
pankso@12285 47 # Fixed modules.dep to use right path
pankso@12285 48 # saves 100kb of space too
pankso@12285 49 sed -i "s|$_pkg||g" $fs/lib/modules/$KBASEVER-slitaz/modules.dep
pankso@12285 50 sed -i "s|99.98.$KBASEVER-slitaz|$KBASEVER-slitaz|g" $fs/lib/modules/$KBASEVER-slitaz/modules.dep
pankso@12285 51 # Check and echo any module in kernel .config that's not added to
pankso@12285 52 # one of linux-* pkgs
pankso@12285 53 $wanted_stuff/check_modules.sh
pankso@12285 54 }
pankso@12285 55
pankso@12285 56 # Pre and post install commands for Tazpkg.
pankso@12285 57 post_install()
pankso@12285 58 {
pankso@12285 59 echo "Processing post-install commands..."
pankso@12285 60 chroot "$1/" depmod -a $KBASEVER-slitaz
pankso@12285 61 # GRUB stuff.
pankso@12285 62 if [ -f "$1/boot/grub/menu.lst" ]; then
pankso@12285 63 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
pankso@12285 64 grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1`
pankso@12285 65 # Add new kernel entry in case of upgrade for installed system.
pankso@12285 66 if ! grep -q $PACKAGE-$VERSION-slitaz $1/boot/grub/menu.lst; then
pankso@12285 67 cat >> $1/boot/grub/menu.lst << EOT
pankso@12285 68
pankso@12285 69 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
pankso@12285 70 $grub_dev
pankso@12285 71 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
pankso@12285 72 EOT
pankso@12285 73 fi
pankso@12285 74 # Display information message.
pankso@12285 75 cat <<EOT
pankso@12285 76 ----
pankso@12285 77 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
pankso@12285 78
pankso@12285 79 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
pankso@12285 80 $grub_dev
pankso@12285 81 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
pankso@12285 82 ----
pankso@12285 83 EOT
pankso@12285 84 fi
pankso@12285 85 }