wok-current view linux/receipt @ rev 905

Linux: don't use rdev
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jun 15 12:47:58 2008 +0000 (2008-06-15)
parents 04b68c6ffdfa
children 34e504bf5887
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 $PACKAGE-rootdev.u
25 EOT
26 make mrproper
27 cp ../stuff/$PACKAGE-$VERSION-slitaz.config .config
28 make oldconfig
29 make bzImage
30 make modules
31 make INSTALL_MOD_PATH=$PWD/_pkg modules_install
32 make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 local path
39 mkdir $fs/boot
40 cp -a $src/arch/x86/boot/bzImage $fs/boot/vmlinuz-$VERSION-slitaz
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 }