wok view linux/receipt @ rev 1423

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