wok-current annotate linux-pae/receipt @ rev 25728
Merge wok for both arch and few updates
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Thu Dec 05 08:39:45 2024 +0000 (5 weeks ago) |
parents | b24b6ee1d4d2 |
children |
rev | line source |
---|---|
shann@25634 | 1 # SliTaz package receipt. |
shann@25634 | 2 |
shann@25634 | 3 PACKAGE="linux-pae" |
shann@25728 | 4 VERSION="5.10.221" |
shann@25634 | 5 CATEGORY="base-system" |
shann@25634 | 6 SHORT_DESC="The Linux PAE kernel and modules." |
shann@25634 | 7 MAINTAINER="devel@slitaz.org" |
shann@25634 | 8 LICENSE="GPL2" |
shann@25634 | 9 WEB_SITE="https://www.kernel.org/" |
shann@25634 | 10 WANTED="linux" |
shann@25634 | 11 PROVIDE="linux" |
shann@25634 | 12 |
shann@25634 | 13 # We want it regenerated on each kernel/module install |
shann@25634 | 14 #CONFIG_FILES="/lib/modules/$VERSION-slitaz-pae/modules.dep" |
shann@25634 | 15 |
shann@25634 | 16 DEPENDS="kmod" |
shann@25634 | 17 |
shann@25634 | 18 # Rules to gen a SliTaz package suitable for Tazpkg. |
shann@25634 | 19 genpkg_rules() |
shann@25634 | 20 { |
shann@25634 | 21 local path |
shann@25634 | 22 install=$install/linux-pae |
shann@25634 | 23 src=$WOK/$PACKAGE/source/tmp |
shann@25634 | 24 cp -a $install/boot $fs |
shann@25634 | 25 path=$fs/lib/modules/$VERSION-slitaz-pae/kernel |
shann@25634 | 26 mkdir -p $path |
shann@25634 | 27 cp -a $install/lib/modules/$VERSION-slitaz-pae/mo* \ |
shann@25634 | 28 $fs/lib/modules/$VERSION-slitaz-pae |
shann@25634 | 29 |
shann@25634 | 30 # Get the base modules |
shann@25634 | 31 export src |
shann@25634 | 32 export install |
shann@25634 | 33 mkdir -p $WOK/$PACKAGE/source/tmp |
shann@25634 | 34 $wanted_stuff/list_modules.sh \ |
shann@25634 | 35 $(cat $stuff/modules-pae.list) > $WOK/$PACKAGE/source/tmp/modules.list |
shann@25634 | 36 while read module; do |
shann@25634 | 37 dir=$(dirname $module) |
shann@25634 | 38 [ -d $path/$dir ] || mkdir -p $path/$dir |
shann@25634 | 39 cp -a $install/lib/modules/$VERSION-slitaz-pae/kernel/$module $path/$dir |
shann@25634 | 40 done < $WOK/$PACKAGE/source/tmp/modules.list |
shann@25634 | 41 # Remove unresolved links |
shann@25634 | 42 rm -f $fs/lib/modules/$VERSION-slitaz-pae/build |
shann@25634 | 43 rm -f $fs/lib/modules/$VERSION-slitaz-pae/source |
shann@25634 | 44 # Cook all packages with a kernel module |
shann@25634 | 45 for i in $(cd $WOK; grep -l '^WANTED="linux"' linux-pae-*/receipt); do |
shann@25634 | 46 cook ${i%/receipt} |
shann@25634 | 47 done |
shann@25634 | 48 # Fixed modules.dep to use right path |
shann@25634 | 49 # saves 100kb of space too |
shann@25634 | 50 sed -i "s|$install||g" $fs/lib/modules/$VERSION-slitaz-pae/modules.dep |
shann@25634 | 51 sed -i "s|99.98.$VERSION-slitaz|$VERSION-slitaz|g" $fs/lib/modules/$VERSION-slitaz-pae/modules.dep |
shann@25634 | 52 # Check and echo any module in kernel .config that's not added to |
shann@25634 | 53 # one of linux-* pkgs |
shann@25634 | 54 $wanted_stuff/check_modules.sh 2>&1 | grep -v files.list |
shann@25634 | 55 } |
shann@25634 | 56 |
shann@25634 | 57 # Pre and post install commands for Tazpkg. |
shann@25634 | 58 post_install() |
shann@25634 | 59 { |
shann@25634 | 60 chroot "$root/" depmod -a $VERSION-slitaz-pae |
shann@25634 | 61 # GRUB stuff. |
shann@25634 | 62 if [ -f "$root/boot/grub/menu.lst" ]; then |
shann@25634 | 63 root_dev=$(cat $root/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1) |
shann@25634 | 64 grub_dev=$(cat $root/boot/grub/menu.lst | grep "root (" | head -n 1) |
shann@25634 | 65 # Add new kernel entry in case of upgrade for installed system. |
shann@25634 | 66 if ! grep -q $PACKAGE-$VERSION-slitaz-pae "$1/boot/grub/menu.lst"; then |
shann@25634 | 67 cat >> "$1/boot/grub/menu.lst" <<EOT |
shann@25634 | 68 |
shann@25634 | 69 title SliTaz GNU/Linux (Kernel $VERSION-slitaz-pae) |
shann@25634 | 70 $grub_dev |
shann@25634 | 71 kernel /boot/vmlinuz-$VERSION-slitaz-pae root=$root_dev |
shann@25634 | 72 EOT |
shann@25634 | 73 fi |
shann@25634 | 74 # Display information message. |
shann@25634 | 75 cat <<EOT |
shann@25634 | 76 ---- |
shann@25634 | 77 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst: |
shann@25634 | 78 |
shann@25634 | 79 title SliTaz GNU/Linux (Kernel $VERSION-slitaz-pae) |
shann@25634 | 80 $grub_dev |
shann@25634 | 81 kernel /boot/vmlinuz-$VERSION-slitaz-pae root=$root_dev |
shann@25634 | 82 ---- |
shann@25634 | 83 EOT |
shann@25634 | 84 fi |
shann@25634 | 85 } |