wok-current view linux/receipt @ rev 1950

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