wok-4.x view linux-tickless/receipt @ rev 2952

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