wok view linux/receipt @ rev 2804

update qt-4.4.1 to qt-4.5.0
author Allan Pinto <allan316@gmail.com>
date Wed Apr 29 09:28:07 2009 +0000 (2009-04-29)
parents d1f8fd6f6efe
children f306d126580e
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 $PACKAGE-ioremap-$VERSION.u
39 EOT
40 make mrproper
41 cp ../stuff/$PACKAGE-$VERSION-slitaz.config .config
42 make oldconfig
43 ln .config slitaz/config
44 make bzImage
45 make modules
46 make INSTALL_MOD_PATH=$PWD/_pkg modules_install
47 make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install
48 }
50 # Rules to gen a SliTaz package suitable for Tazpkg.
51 genpkg_rules()
52 {
53 local path
54 mkdir $fs/boot
55 cp -a $src/arch/x86/boot/bzImage $fs/boot/vmlinuz-$VERSION-slitaz
56 # Compress all modules.
57 # Package module-init-tools is compiled with zlib support.
58 #
59 ./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz
60 path=$fs/lib/modules/$VERSION-slitaz/kernel
61 mkdir -p $path
62 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* $fs/lib/modules/$VERSION-slitaz
63 cp ./stuff/list_modules.sh $src
64 export src
65 export _pkg
66 $src/list_modules.sh $(cat stuff/modules-$VERSION.list) > $src/modules.list
67 while read module; do
68 dir=$(dirname $module)
69 [ -d $path/$dir ] || mkdir -p $path/$dir
70 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir
71 done < $src/modules.list
72 # Remove unresolved links
73 rm -f $fs/lib/modules/$VERSION-slitaz/build
74 rm -f $fs/lib/modules/$VERSION-slitaz/source
75 # Package all linux pkgs
76 for i in $(cd $WOK; ls -d linux-*)
77 do
78 tazwok genpkg $i
79 done
80 # Cook all packages with a kernel module
81 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt)
82 do
83 echo tazwok cook ${i%/receipt}
84 done
85 }
87 # Pre and post install commands for Tazpkg.
88 # GRUB stuf.
89 post_install()
90 {
91 echo "Processing post-install commands..."
92 depmod -a -b "$1/" $VERSION-slitaz
93 if [ -f "$1/boot/grub/menu.lst" ]; then
94 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/'`
95 grub_dev=`cat $1/boot/grub/menu.lst | grep "root ("`
96 # Add new kernel entry in case of upgrade for installed system.
97 cat >> $1/boot/grub/menu.lst << EOT
99 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
100 $grub_dev
101 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
102 EOT
103 # Display information message.
104 cat <<EOT
105 ----
106 GRUB is installed, these tree lines has been added to the menu.lst:
108 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
109 $grub_dev
110 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
111 ----
112 EOT
113 fi
114 }