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