wok-next view linux-source/receipt @ rev 5035

Up:mplayer-svn;improve compile_options; reduce deps and size
author Rohit Joshi <jozee@slitaz.org>
date Wed Mar 03 11:21:08 2010 +0000 (2010-03-03)
parents 92cea60a3573
children 0a141e63543b
line source
1 # SliTaz package receipt.
3 PACKAGE="linux-source"
4 VERSION="2.6.30.6"
5 CATEGORY="development"
6 SHORT_DESC="The Linux kernel source files."
7 MAINTAINER="devel@slitaz.org"
8 WANTED="linux"
9 WEB_SITE="http://www.kernel.org/"
10 DEPENDS="linux slitaz-toolchain ncurses-dev perl"
12 # Rules to gen a SliTaz package suitable for Tazpkg.
13 genpkg_rules()
14 {
15 mkdir -p $fs/usr/src/linux-$VERSION-slitaz \
16 $fs/lib/modules/$VERSION-slitaz/
17 ln -s linux-$VERSION-slitaz $fs/usr/src/linux
18 cp -a $src/slitaz $fs/usr/src/linux-$VERSION-slitaz
19 cp -a stuff/buildtaz $fs/usr/src/linux-$VERSION-slitaz/slitaz
20 cp -a stuff/make-tazpkg.u $fs/usr/src/linux-$VERSION-slitaz/slitaz
21 # Copy Aufs2 source files
22 if [ -d $WOK/$WANTED/aufs2 ]; then
23 mkdir $fs/usr/src/linux-$VERSION-slitaz/slitaz/aufs2
24 cp -a $WOK/$WANTED/aufs2/Documentation \
25 $WOK/$WANTED/aufs2/fs $WOK/$WANTED/aufs2/include \
26 $fs/usr/src/linux-$VERSION-slitaz/slitaz/aufs2
27 fi
28 ln -s /usr/src/linux-$VERSION-slitaz \
29 $fs/lib/modules/$VERSION-slitaz/source
30 ln -s /usr/src/linux-$VERSION-slitaz \
31 $fs/lib/modules/$VERSION-slitaz/build
32 }
34 # Post install/remove commands for Tazpkg.
35 post_install()
36 {
37 local url
38 local patch_file
39 cd $1/usr/src/
40 url=$(cat linux-$VERSION-slitaz/slitaz/url)
41 wget -c $url
42 tar xjf $(basename $url)
43 mv linux-$VERSION-slitaz/slitaz linux-$VERSION
44 rm -rf linux-$VERSION-slitaz
45 mv linux-$VERSION linux-$VERSION-slitaz
46 cd linux-$VERSION-slitaz
47 cp -pa slitaz/aufs2/* .
48 # Add tazpkg support
49 if [ -d "scripts/package" ]; then
50 cp -pa slitaz/buildtaz scripts/package
51 patch -p1 -i slitaz/make-tazpkg.u
52 fi
54 while read patch_file; do
55 echo "Apply $patch_file"
56 patch -p1 < slitaz/$patch_file
57 done < slitaz/patches
58 [ ! -f System.map ] && cp slitaz/config .config &&
59 make oldconfig && make modules_prepare
60 cat <<EOT
61 ----
62 To modify the kernel configuration:
63 $ cd /usr/src/linux-$VERSION-slitaz
64 $ make menuconfig
66 To build the kernel and the modules:
67 $ cd /usr/src/linux-$VERSION-slitaz
68 $ make bzImage && make modules
70 To install the new kernel and the modules:
71 $ make modules_install
72 $ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz
74 To make a Slitaz package with the new kernel and the modules:
75 $ make tazpkg
77 See /usr/src/linux-$VERSION-slitaz/README
78 ----
79 EOT
80 }
82 pre_remove()
83 {
84 rm $(basename $(cat /usr/src/linux-$VERSION-slitaz/slitaz/url)) 2> /dev/null || true
85 }
87 post_remove()
88 {
89 rm -rf /usr/src/linux-$VERSION-slitaz
90 }