wok-current view linux/receipt @ rev 886
Up: linux (2.5.25.5)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jun 07 22:04:11 2008 +0000 (2008-06-07) |
parents | 7a8f9456adc2 |
children | da3467381855 |
line source
1 # SliTaz package receipt.
3 PACKAGE="linux"
4 VERSION="2.6.25.5"
5 CATEGORY="base-system"
6 SHORT_DESC="The Linux kernel and modules."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.bz2"
9 WEB_SITE="http://www.kernel.org/"
10 WGET_URL="http://www.eu.kernel.org/pub/linux/kernel/v2.6/$TARBALL"
12 # Rules to configure and make the package.
13 compile_rules()
14 {
15 cd $src
16 # lzma and misc patches from pascal
17 while read patch_file; do
18 echo "Apply $patch_file"
19 patch -p1 < ../stuff/$patch_file || return 1
20 done <<EOT
21 $PACKAGE-lzma-$VERSION.u
22 $PACKAGE-utf8-$VERSION.u
23 $PACKAGE-diff-$VERSION.u
24 EOT
25 make mrproper
26 cp ../stuff/$PACKAGE-$VERSION-slitaz.config .config
27 make oldconfig
28 make bzImage
29 make modules
30 make INSTALL_MOD_PATH=$PWD/_pkg modules_install
31 make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 local path
38 mkdir $fs/boot
39 cp -a $src/arch/x86/boot/bzImage $fs/boot/vmlinuz-$VERSION-slitaz
40 rdev $fs/boot/vmlinuz-$VERSION-slitaz /dev/ram0
41 # Compress all modules.
42 # Package module-init-tools is compiled with zlib support.
43 #
44 ./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz
45 path=$fs/lib/modules/$VERSION-slitaz/kernel
46 mkdir -p $path
47 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* $fs/lib/modules/$VERSION-slitaz
48 cp ./stuff/list_modules.sh $src
49 export src
50 export _pkg
51 $src/list_modules.sh $(cat stuff/modules-$VERSION.list) > $src/modules.list
52 while read module; do
53 dir=$(dirname $module)
54 [ -d $path/$dir ] || mkdir -p $path/$dir
55 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir
56 done < $src/modules.list
57 # Remove unresolved links
58 rm -f $fs/lib/modules/$VERSION-slitaz/build
59 rm -f $fs/lib/modules/$VERSION-slitaz/source
60 # Package all linux pkgs
61 for i in $(cd $WOK; ls -d linux-*)
62 do
63 tazwok genpkg $i
64 done
65 # Cook all packages with a kernel module
66 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt)
67 do
68 echo tazwok cook ${i%/receipt}
69 done
70 }
72 # Pre and post install commands for Tazpkg.
73 # GRUB stuf.
74 post_install()
75 {
76 echo "Processing post-install commands..."
77 depmod -a -b "$1/" $VERSION-slitaz
78 cat <<EOT
79 ----
80 If you have GRUB installed, you can add tree lines to boot SliTaz.
81 Example /boot/grub/menu.lst
83 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
84 root(hd0,0)
85 kernel /boot/vmlinuz-$VERSION-slitaz root=/dev/hda1 vga=771
86 ----
87 EOT
88 }