wok-6.x view linux-source/receipt @ rev 5227

linux-source: do not use busybox patch
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 07 21:03:30 2010 +0200 (2010-04-07)
parents 7e6113d6a59c
children 2ae67cafd57e
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 [ -L /usr/bin/patch ] && tazpkg get-install patch --forced
49 # Add tazpkg support
50 if [ -d "scripts/package" ]; then
51 cp -pa slitaz/buildtaz scripts/package
52 patch -p1 -i slitaz/make-tazpkg.u
53 fi
55 while read patch_file; do
56 echo "Apply $patch_file"
57 patch -p1 < slitaz/$patch_file
58 done < slitaz/patches
59 [ ! -f System.map ] && cp slitaz/config .config &&
60 make oldconfig && make modules_prepare
61 cat <<EOT
62 ----
63 To modify the kernel configuration:
64 $ cd /usr/src/linux-$VERSION-slitaz
65 $ make menuconfig
67 To build the kernel and the modules:
68 $ cd /usr/src/linux-$VERSION-slitaz
69 $ make bzImage && make modules
71 To install the new kernel and the modules:
72 $ make modules_install
73 $ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz
75 To make a Slitaz package with the new kernel and the modules:
76 $ make tazpkg
78 See /usr/src/linux-$VERSION-slitaz/README
79 ----
80 EOT
81 }
83 pre_remove()
84 {
85 rm $(basename $(cat /usr/src/linux-$VERSION-slitaz/slitaz/url)) 2> /dev/null || true
86 }
88 post_remove()
89 {
90 rm -rf /usr/src/linux-$VERSION-slitaz
91 }