wok-current annotate linux64/receipt @ rev 14175

Up linux (3.2.40)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Mar 10 13:32:17 2013 +0100 (2013-03-10)
parents d9abc342bfd6
children ad59999b3fce
rev   line source
pankso@12285 1 # SliTaz package receipt.
pankso@12285 2
pankso@12285 3 PACKAGE="linux64"
pascal@14175 4 VERSION="3.2.40"
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 path=$fs/lib/modules/$KBASEVER-slitaz/kernel
pankso@12285 23 mkdir -p $path
pankso@12285 24 cp -a $_pkg/lib/modules/$KBASEVER-slitaz/mo* \
pankso@12285 25 $fs/lib/modules/$KBASEVER-slitaz
pascal@14003 26 [ "$KBASEVER" != "$VERSION" ] &&
pascal@14003 27 ln -s $KBASEVER-slitaz $fs/lib/modules/$VERSION-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 \
pascal@13937 33 $(cat $stuff/modules64.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
pascal@13937 43 for i in $(cd $WOK; grep -l 'cook linux$' */receipt)
pankso@12285 44 do
pascal@13937 45 echo 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
pascal@13941 53 $wanted_stuff/check_modules.sh 2>&1 | grep -v files.list
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 }