wok-current view linux64/receipt @ rev 18320

btrfs-progs, gcc49-lib-base: typo in PROVIDE
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Aug 30 11:20:28 2015 +0200 (2015-08-30)
parents 19630aaa1da0
children 9e01bc6321ea
line source
1 # SliTaz package receipt.
3 PACKAGE="linux64"
4 VERSION="3.2.71"
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-slitaz64/modules.dep"
16 DEPENDS="depmod"
18 # Rules to gen a SliTaz package suitable for Tazpkg.
19 genpkg_rules()
20 {
21 local path
22 install=$install/linux64
23 src=$WOK/$PACKAGE/source/tmp
24 cp -a $install/boot $fs
25 path=$fs/lib/modules/$VERSION-slitaz64/kernel
26 mkdir -p $path
27 cp -a $install/lib/modules/$VERSION-slitaz64/mo* \
28 $fs/lib/modules/$VERSION-slitaz64
30 # Get the base modules
31 export src
32 export install
33 mkdir -p $WOK/$PACKAGE/source/tmp
34 $wanted_stuff/list_modules.sh \
35 $(cat $stuff/modules64.list) > $WOK/$PACKAGE/source/tmp/modules.list
36 while read module; do
37 dir=$(dirname $module)
38 [ -d $path/$dir ] || mkdir -p $path/$dir
39 cp -a $install/lib/modules/$VERSION-slitaz64/kernel/$module $path/$dir
40 done < $WOK/$PACKAGE/source/tmp/modules.list
41 # Remove unresolved links
42 rm -f $fs/lib/modules/$VERSION-slitaz64/build
43 rm -f $fs/lib/modules/$VERSION-slitaz64/source
44 # Cook all packages with a kernel module
45 for i in $(cd $WOK; grep -l 'cook linux64$' */receipt)
46 do
47 echo cook ${i%/receipt}
48 done
49 # Fixed modules.dep to use right path
50 # saves 100kb of space too
51 sed -i "s|$install||g" $fs/lib/modules/$VERSION-slitaz64/modules.dep
52 sed -i "s|99.98.$VERSION-slitaz|$VERSION-slitaz|g" $fs/lib/modules/$VERSION-slitaz64/modules.dep
53 # Check and echo any module in kernel .config that's not added to
54 # one of linux-* pkgs
55 $wanted_stuff/check_modules.sh 2>&1 | grep -v files.list
56 }
58 # Pre and post install commands for Tazpkg.
59 post_install()
60 {
61 echo "Processing post-install commands..."
62 chroot "$root/" depmod -a $VERSION-slitaz64
63 # GRUB stuff.
64 if [ -f "$root/boot/grub/menu.lst" ]; then
65 root_dev=$(cat $root/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1)
66 grub_dev=$(cat $root/boot/grub/menu.lst | grep "root (" | head -n 1)
67 # Add new kernel entry in case of upgrade for installed system.
68 if ! grep -q $PACKAGE-$VERSION-slitaz64 $1/boot/grub/menu.lst; then
69 cat >> $1/boot/grub/menu.lst << EOT
71 title SliTaz GNU/Linux (Kernel $VERSION-slitaz64)
72 $grub_dev
73 kernel /boot/vmlinuz-$VERSION-slitaz64 root=$root_dev
74 EOT
75 fi
76 # Display information message.
77 cat <<EOT
78 ----
79 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
81 title SliTaz GNU/Linux (Kernel $VERSION-slitaz64)
82 $grub_dev
83 kernel /boot/vmlinuz-$VERSION-slitaz64 root=$root_dev
84 ----
85 EOT
86 fi
87 }