wok view linux-source/receipt @ rev 4630
linux-source: aufs2 fix + install speedup (thanks erjo)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Dec 22 10:10:01 2009 +0100 (2009-12-22) |
parents | 7589496c772c |
children | 7e6113d6a59c |
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
20 # Copy Aufs2 source files
21 if [ -d $WOK/$WANTED/aufs2 ]; then
22 mkdir $fs/usr/src/linux-$VERSION-slitaz/slitaz/aufs2
23 cp -a $WOK/$WANTED/aufs2/Documentation \
24 $WOK/$WANTED/aufs2/fs $WOK/$WANTED/aufs2/include \
25 $fs/usr/src/linux-$VERSION-slitaz/slitaz/aufs2
26 fi
27 ln -s /usr/src/linux-$VERSION-slitaz \
28 $fs/lib/modules/$VERSION-slitaz/source
29 ln -s /usr/src/linux-$VERSION-slitaz \
30 $fs/lib/modules/$VERSION-slitaz/build
31 }
33 # Post install/remove commands for Tazpkg.
34 post_install()
35 {
36 local url
37 local patch_file
38 cd $1/usr/src/
39 url=$(cat linux-$VERSION-slitaz/slitaz/url)
40 wget -c $url
41 tar xjf $(basename $url)
42 mv linux-$VERSION-slitaz/slitaz linux-$VERSION
43 rm -rf linux-$VERSION-slitaz
44 mv linux-$VERSION linux-$VERSION-slitaz
45 cd linux-$VERSION-slitaz
46 cp -pa slitaz/aufs2/* .
47 while read patch_file; do
48 echo "Apply $patch_file"
49 patch -p1 < slitaz/$patch_file
50 done < slitaz/patches
51 [ ! -f System.map ] && cp slitaz/config .config &&
52 make oldconfig && make modules_prepare
53 cat <<EOT
54 ----
55 To modify the kernel configuration:
56 $ cd /usr/src/linux-$VERSION-slitaz
57 $ make menuconfig
59 To build the kernel and the modules:
60 $ cd /usr/src/linux-$VERSION-slitaz
61 $ make bzImage && make modules
63 To install the new kernel and the modules:
64 $ make modules_install
65 $ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz
67 See /usr/src/linux-$VERSION-slitaz/README
68 ----
69 EOT
70 }
72 pre_remove()
73 {
74 rm $(basename $(cat /usr/src/linux-$VERSION-slitaz/slitaz/url)) 2> /dev/null || true
75 }
77 post_remove()
78 {
79 rm -rf /usr/src/linux-$VERSION-slitaz
80 }