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