wok-next view linux64/receipt @ rev 19731
Up tcc (20170515) again
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu May 25 19:02:05 2017 +0200 (2017-05-25) |
parents | 6fab3264ba87 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="linux64"
4 VERSION="4.9.0"
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="https://www.kernel.org/"
10 PROVIDE="linux"
12 WANTED="linux"
13 DEPENDS="depmod"
15 # We want it regenerated on each kernel/module install
16 #CONFIG_FILES="/lib/modules/$VERSION-slitaz64/modules.dep"
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
42 # Remove unresolved links
43 rm -f $fs/lib/modules/$VERSION-slitaz64/build
44 rm -f $fs/lib/modules/$VERSION-slitaz64/source
46 # Cook all packages with a kernel module
47 for i in $(cd $WOK; grep -l 'cook linux64$' */receipt); do
48 echo cook ${i%/receipt}
49 done
51 # Fixed modules.dep to use right path
52 # saves 100kb of space too
53 sed -i "s|$install||g" $fs/lib/modules/$VERSION-slitaz64/modules.dep
54 sed -i "s|99.98.$VERSION-slitaz|$VERSION-slitaz|g" $fs/lib/modules/$VERSION-slitaz64/modules.dep
56 # Check and echo any module in kernel .config that's not added to
57 # one of linux-* pkgs
58 $wanted_stuff/check_modules.sh 2>&1 | grep -v files.list
59 }
61 # Pre and post install commands for Tazpkg.
62 post_install()
63 {
64 # GRUB stuff.
65 if [ -f "$root/boot/grub/menu.lst" ]; then
66 root_dev=$(cat $root/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1)
67 grub_dev=$(cat $root/boot/grub/menu.lst | grep "root (" | head -n 1)
68 # Add new kernel entry in case of upgrade for installed system.
69 if ! grep -q $PACKAGE-$VERSION-slitaz64 "$1/boot/grub/menu.lst"; then
70 cat >> "$1/boot/grub/menu.lst" <<EOT
72 title SliTaz GNU/Linux (Kernel $VERSION-slitaz64)
73 $grub_dev
74 kernel /boot/vmlinuz-$VERSION-slitaz64 root=$root_dev
75 EOT
76 fi
77 # Display information message.
78 cat <<EOT
79 ----
80 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
82 title SliTaz GNU/Linux (Kernel $VERSION-slitaz64)
83 $grub_dev
84 kernel /boot/vmlinuz-$VERSION-slitaz64 root=$root_dev
85 ----
86 EOT
87 fi
88 }