wok-stable view linux/receipt @ rev 4987
fix: RAM for get-foxit-reader; Add TAGS
author | Rohit Joshi <jozee@slitaz.org> |
---|---|
date | Thu Feb 25 10:48:00 2010 +0000 (2010-02-25) |
parents | d3d7a8442ba4 |
children | b4fa2f5e2632 |
line source
1 # SliTaz package receipt.
3 PACKAGE="linux"
4 VERSION="2.6.30.6"
5 CATEGORY="base-system"
6 SHORT_DESC="The Linux kernel and modules."
7 DEPENDS="depmod"
8 BUILD_DEPENDS="slitaz-toolchain perl git"
9 MAINTAINER="devel@slitaz.org"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 WEB_SITE="http://www.kernel.org/"
12 WGET_URL="http://www.eu.kernel.org/pub/linux/kernel/v${VERSION:0:3}/$TARBALL"
13 CONFIG_FILES="/lib/modules/$VERSION-slitaz/modules.dep"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 # Aufs2 from git repository
19 if [ ! -d aufs2 ]; then
20 git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git aufs2
21 cd aufs2 && git checkout origin/aufs2-30
22 cp -a Documentation fs include $src
23 cp -a *.patch ../stuff
24 [ -L /usr/bin/patch ] && tazpkg get-install patch --forced
25 fi
26 cd $src
27 # SliTaz db
28 rm -rf slitaz 2> /dev/null
29 mkdir slitaz
30 echo "$WGET_URL" > slitaz/url
31 cp ../stuff/gztazmod.sh ../stuff/list_modules.sh slitaz
32 cp ../stuff/bootloader.sh slitaz
33 # Misc patches from pascal
34 while read patch_file; do
35 echo "$patch_file" >> slitaz/patches
36 #cp ../stuff/$patch_file slitaz/$patch_file
37 cp ../stuff/$patch_file slitaz
38 if [ -f done.$patch_file ]; then
39 echo "Skipping $patch_file"
40 continue
41 fi
42 echo "Apply $patch_file"
43 patch -p1 < slitaz/$patch_file || exit 1
44 touch done.$patch_file
45 done <<EOT
46 $PACKAGE-utf8-$VERSION.u
47 $PACKAGE-diff-$VERSION.u
48 $PACKAGE-freeinitrd-$VERSION.u
49 $PACKAGE-unlzma-$VERSION.u
50 aufs2-base.patch
51 aufs2-kbuild.patch
52 aufs2-standalone.patch
53 $PACKAGE-header-$VERSION.u
54 $PACKAGE-squashfs-lzma-$VERSION.u
55 EOT
56 make mrproper
57 cd Documentation/lguest
58 make lguest || return 1
59 cd ../..
60 cp ../stuff/$PACKAGE-$VERSION-slitaz.config .config
61 make oldconfig
62 ln .config slitaz/config
63 make bzImage &&
64 make modules &&
65 make INSTALL_MOD_PATH=$PWD/_pkg modules_install &&
66 make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install &&
67 [ -s arch/x86/boot/bzImage ]
68 }
70 # Rules to gen a SliTaz package suitable for Tazpkg.
71 genpkg_rules()
72 {
73 local path
74 mkdir $fs/boot
75 cp -a $src/arch/x86/boot/bzImage $fs/boot/vmlinuz-$VERSION-slitaz
76 # Compress all modules.
77 # Package module-init-tools is compiled with zlib support.
78 #
79 ./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz
80 path=$fs/lib/modules/$VERSION-slitaz/kernel
81 mkdir -p $path
82 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* $fs/lib/modules/$VERSION-slitaz
83 export src
84 export _pkg
85 $src/slitaz/list_modules.sh \
86 $(cat stuff/modules-$VERSION.list) > $src/modules.list
87 while read module; do
88 dir=$(dirname $module)
89 [ -d $path/$dir ] || mkdir -p $path/$dir
90 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir
91 done < $src/modules.list
92 # Remove unresolved links
93 rm -f $fs/lib/modules/$VERSION-slitaz/build
94 rm -f $fs/lib/modules/$VERSION-slitaz/source
95 # Package all linux pkgs
96 for i in $(cd $WOK; ls -d linux-*)
97 do
98 tazwok genpkg $i
99 done
100 # Cook all packages with a kernel module
101 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt)
102 do
103 echo tazwok cook ${i%/receipt}
104 done
105 # check and echo any module in kernel .config that's not added to one of linux-* pkgs
106 ./stuff/check_modules.sh
107 }
109 # Pre and post install commands for Tazpkg.
110 # GRUB stuf.
111 post_install()
112 {
113 echo "Processing post-install commands..."
114 chroot "$1/" depmod -a $VERSION-slitaz
115 if [ -f "$1/boot/grub/menu.lst" ]; then
116 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
117 grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1`
118 # Add new kernel entry in case of upgrade for installed system.
119 if ! grep -q $PACKAGE-$VERSION-slitaz $1/boot/grub/menu.lst; then
120 cat >> $1/boot/grub/menu.lst << EOT
122 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
123 $grub_dev
124 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
125 EOT
126 fi
127 # Display information message.
128 cat <<EOT
129 ----
130 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
132 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
133 $grub_dev
134 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
135 ----
136 EOT
137 fi
138 }
140 clean_wok()
141 {
142 rm -rf aufs2
143 }