wok annotate linux64/receipt @ rev 16600
get-skype: create /var/lib/dbus/machine-id, thanks yves04
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed May 07 14:16:51 2014 +0000 (2014-05-07) |
parents | eb689de65d7e |
children | 962f1c89c58a |
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 CATEGORY="base-system" |
pankso@12285 | 6 SHORT_DESC="The Linux 64 bits kernel and modules." |
pankso@12285 | 7 MAINTAINER="devel@slitaz.org" |
pascal@14657 | 8 LICENSE="GPL2" |
pankso@12285 | 9 WEB_SITE="http://www.kernel.org/" |
pankso@12285 | 10 WANTED="linux" |
pankso@12285 | 11 PROVIDE="linux" |
pankso@15866 | 12 |
pankso@15866 | 13 # We want it regenerated on each kernel/module install |
pankso@15866 | 14 #CONFIG_FILES="/lib/modules/$VERSION-slitaz/modules.dep" |
pankso@12285 | 15 |
pankso@12285 | 16 DEPENDS="depmod" |
pankso@12285 | 17 |
pankso@12285 | 18 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@12285 | 19 genpkg_rules() |
pankso@12285 | 20 { |
pankso@12285 | 21 local path |
pascal@15603 | 22 _pkg=$install/linux64 |
pascal@15610 | 23 cp -a $_pkg/boot $fs |
pankso@15866 | 24 path=$fs/lib/modules/$VERSION-slitaz/kernel |
pankso@12285 | 25 mkdir -p $path |
pankso@15866 | 26 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* \ |
pankso@15866 | 27 $fs/lib/modules/$VERSION-slitaz |
pankso@15866 | 28 |
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 |
pankso@15866 | 38 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir |
pankso@12285 | 39 done < $WOK/$PACKAGE/source/tmp/modules.list |
pankso@12285 | 40 # Remove unresolved links |
pankso@15866 | 41 rm -f $fs/lib/modules/$VERSION-slitaz/build |
pankso@15866 | 42 rm -f $fs/lib/modules/$VERSION-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@15866 | 50 sed -i "s|$_pkg||g" $fs/lib/modules/$VERSION-slitaz/modules.dep |
pankso@15866 | 51 sed -i "s|99.98.$VERSION-slitaz|$VERSION-slitaz|g" $fs/lib/modules/$VERSION-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@15866 | 61 chroot "$root/" depmod -a $VERSION-slitaz |
pankso@12285 | 62 # GRUB stuff. |
pankso@15866 | 63 if [ -f "$root/boot/grub/menu.lst" ]; then |
pankso@15866 | 64 root_dev=$(cat $root/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1) |
pankso@15866 | 65 grub_dev=$(cat $root/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 } |