wok-6.x view linux-tickless/receipt @ rev 2600

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