wok-current view linux/receipt @ rev 1146
phpmyadmin: fix recook
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jul 25 22:27:52 2008 +0000 (2008-07-25) |
parents | da3467381855 |
children | d442045183a5 |
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 mkdir slitaz
17 echo "$WGET_URL" > slitaz/url
18 cp ../stuff/gztazmod.sh ../stuff/list_modules.sh slitaz
19 # lzma and misc patches from pascal
20 while read patch_file; do
21 echo "Apply $patch_file"
22 patch -p1 < ../stuff/$patch_file || return 1
23 echo "$patch_file" >> slitaz/patches
24 cp ../stuff/$patch_file slitaz/$patch_file
25 done <<EOT
26 $PACKAGE-lzma-$VERSION.u
27 $PACKAGE-utf8-$VERSION.u
28 $PACKAGE-diff-$VERSION.u
29 $PACKAGE-rootdev.u
30 EOT
31 make mrproper
32 cp ../stuff/$PACKAGE-$VERSION-slitaz.config .config
33 make oldconfig
34 ln .config slitaz/config
35 make bzImage
36 make modules
37 make INSTALL_MOD_PATH=$PWD/_pkg modules_install
38 make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install
39 }
41 # Rules to gen a SliTaz package suitable for Tazpkg.
42 genpkg_rules()
43 {
44 local path
45 mkdir $fs/boot
46 cp -a $src/arch/x86/boot/bzImage $fs/boot/vmlinuz-$VERSION-slitaz
47 # Compress all modules.
48 # Package module-init-tools is compiled with zlib support.
49 #
50 ./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz
51 path=$fs/lib/modules/$VERSION-slitaz/kernel
52 mkdir -p $path
53 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* $fs/lib/modules/$VERSION-slitaz
54 cp ./stuff/list_modules.sh $src
55 export src
56 export _pkg
57 $src/list_modules.sh $(cat stuff/modules-$VERSION.list) > $src/modules.list
58 while read module; do
59 dir=$(dirname $module)
60 [ -d $path/$dir ] || mkdir -p $path/$dir
61 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir
62 done < $src/modules.list
63 # Remove unresolved links
64 rm -f $fs/lib/modules/$VERSION-slitaz/build
65 rm -f $fs/lib/modules/$VERSION-slitaz/source
66 # Package all linux pkgs
67 for i in $(cd $WOK; ls -d linux-*)
68 do
69 tazwok genpkg $i
70 done
71 # Cook all packages with a kernel module
72 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt)
73 do
74 echo tazwok cook ${i%/receipt}
75 done
76 }
78 # Pre and post install commands for Tazpkg.
79 # GRUB stuf.
80 post_install()
81 {
82 echo "Processing post-install commands..."
83 depmod -a -b "$1/" $VERSION-slitaz
84 cat <<EOT
85 ----
86 If you have GRUB installed, you can add tree lines to boot SliTaz.
87 Example /boot/grub/menu.lst
89 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
90 root(hd0,0)
91 kernel /boot/vmlinuz-$VERSION-slitaz root=/dev/hda1 vga=771
92 ----
93 EOT
94 }