wok-next view linux64/receipt @ rev 13361
Add opus-tools
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Sep 12 16:59:14 2012 +0200 (2012-09-12) |
parents | |
children | edd6117a0e47 |
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 # Compress all modules.
23 #$wanted_stuff/gztazmod.sh $_pkg/lib/modules/$KBASEVER-slitaz
24 path=$fs/lib/modules/$KBASEVER-slitaz/kernel
25 mkdir -p $path
26 cp -a $_pkg/lib/modules/$KBASEVER-slitaz/mo* \
27 $fs/lib/modules/$KBASEVER-slitaz
28 # Get the base modules
29 export src
30 export _pkg
31 mkdir -p $WOK/$PACKAGE/source/tmp
32 $wanted_stuff/list_modules.sh \
33 $(cat $wanted_stuff/modules.list) > $WOK/$PACKAGE/source/tmp/modules.list
34 while read module; do
35 dir=$(dirname $module)
36 [ -d $path/$dir ] || mkdir -p $path/$dir
37 cp -a $_pkg/lib/modules/$KBASEVER-slitaz/kernel/$module $path/$dir
38 done < $WOK/$PACKAGE/source/tmp/modules.list
39 # Remove unresolved links
40 rm -f $fs/lib/modules/$KBASEVER-slitaz/build
41 rm -f $fs/lib/modules/$KBASEVER-slitaz/source
42 # Cook all packages with a kernel module
43 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt)
44 do
45 echo tazwok cook ${i%/receipt}
46 done
47 # Fixed modules.dep to use right path
48 # saves 100kb of space too
49 sed -i "s|$_pkg||g" $fs/lib/modules/$KBASEVER-slitaz/modules.dep
50 sed -i "s|99.98.$KBASEVER-slitaz|$KBASEVER-slitaz|g" $fs/lib/modules/$KBASEVER-slitaz/modules.dep
51 # Check and echo any module in kernel .config that's not added to
52 # one of linux-* pkgs
53 $wanted_stuff/check_modules.sh
54 }
56 # Pre and post install commands for Tazpkg.
57 post_install()
58 {
59 echo "Processing post-install commands..."
60 chroot "$1/" depmod -a $KBASEVER-slitaz
61 # GRUB stuff.
62 if [ -f "$1/boot/grub/menu.lst" ]; then
63 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
64 grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1`
65 # Add new kernel entry in case of upgrade for installed system.
66 if ! grep -q $PACKAGE-$VERSION-slitaz $1/boot/grub/menu.lst; then
67 cat >> $1/boot/grub/menu.lst << EOT
69 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
70 $grub_dev
71 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
72 EOT
73 fi
74 # Display information message.
75 cat <<EOT
76 ----
77 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
79 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
80 $grub_dev
81 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
82 ----
83 EOT
84 fi
85 }