wok view linux/receipt @ rev 2371

Add mmx-emu
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Mar 06 16:29:09 2009 +0000 (2009-03-06)
parents 0f29c565427b
children c841c994fce5
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 BUILD_DEPENDS="slitaz-toolchain perl"
8 MAINTAINER="pascal.bellard@slitaz.org"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://www.kernel.org/"
11 WGET_URL="http://www.eu.kernel.org/pub/linux/kernel/v2.6/$TARBALL"
12 CONFIG_FILES="/lib/modules/$VERSION-slitaz/modules.dep"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 cd $src
18 rm -rf slitaz 2> /dev/null
19 mkdir slitaz
20 echo "$WGET_URL" > slitaz/url
21 cp ../stuff/gztazmod.sh ../stuff/list_modules.sh slitaz
22 # lzma and misc patches from pascal
23 while read patch_file; do
24 if [ -f done.$patch_file ]; then
25 echo "Skipping $patch_file"
26 continue
27 fi
28 echo "Apply $patch_file"
29 patch -p1 < ../stuff/$patch_file || return 1
30 echo "$patch_file" >> slitaz/patches
31 cp ../stuff/$patch_file slitaz/$patch_file
32 touch done.$patch_file
33 done <<EOT
34 $PACKAGE-lzma-$VERSION.u
35 $PACKAGE-utf8-$VERSION.u
36 $PACKAGE-diff-$VERSION.u
37 $PACKAGE-rootdev.u
38 EOT
39 make mrproper
40 cp ../stuff/$PACKAGE-$VERSION-slitaz.config .config
41 make oldconfig
42 ln .config slitaz/config
43 make bzImage
44 make modules
45 make INSTALL_MOD_PATH=$PWD/_pkg modules_install
46 make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 genpkg_rules()
51 {
52 local path
53 mkdir $fs/boot
54 cp -a $src/arch/x86/boot/bzImage $fs/boot/vmlinuz-$VERSION-slitaz
55 # Compress all modules.
56 # Package module-init-tools is compiled with zlib support.
57 #
58 ./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz
59 path=$fs/lib/modules/$VERSION-slitaz/kernel
60 mkdir -p $path
61 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* $fs/lib/modules/$VERSION-slitaz
62 cp ./stuff/list_modules.sh $src
63 export src
64 export _pkg
65 $src/list_modules.sh $(cat stuff/modules-$VERSION.list) > $src/modules.list
66 while read module; do
67 dir=$(dirname $module)
68 [ -d $path/$dir ] || mkdir -p $path/$dir
69 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir
70 done < $src/modules.list
71 # Remove unresolved links
72 rm -f $fs/lib/modules/$VERSION-slitaz/build
73 rm -f $fs/lib/modules/$VERSION-slitaz/source
74 # Package all linux pkgs
75 for i in $(cd $WOK; ls -d linux-*)
76 do
77 tazwok genpkg $i
78 done
79 # Cook all packages with a kernel module
80 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt)
81 do
82 echo tazwok cook ${i%/receipt}
83 done
84 }
86 # Pre and post install commands for Tazpkg.
87 # GRUB stuf.
88 post_install()
89 {
90 echo "Processing post-install commands..."
91 depmod -a -b "$1/" $VERSION-slitaz
92 if [ -f "$1/boot/grub/menu.lst" ]; then
93 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/'`
94 grub_dev=`cat $1/boot/grub/menu.lst | grep "root ("`
95 # Add new kernel entry in case of upgrade for installed system.
96 cat >> $1/boot/grub/menu.lst << EOT
98 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
99 $grub_dev
100 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
101 EOT
102 # Display information message.
103 cat <<EOT
104 ----
105 GRUB is installed, these tree lines has been added to the menu.lst:
107 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
108 $grub_dev
109 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
110 ----
111 EOT
112 fi
113 }