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