wok view linux-source/receipt @ rev 5951

linux-source: add Module.symvers
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Aug 03 18:22:45 2010 +0200 (2010-08-03)
parents 63937e3b2979
children a1cd19a9e269
line source
1 # SliTaz package receipt.
3 PACKAGE="linux-source"
4 VERSION="2.6.34"
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/Module.symvers $fs/usr/src/linux-$VERSION-slitaz
19 cp -a $src/slitaz $fs/usr/src/linux-$VERSION-slitaz
20 cp -a stuff/buildtaz $fs/usr/src/linux-$VERSION-slitaz/slitaz
21 cp -a stuff/make-tazpkg.u $fs/usr/src/linux-$VERSION-slitaz/slitaz
22 # Copy Aufs2 source files
23 if [ -d $WOK/$WANTED/aufs2 ]; then
24 mkdir $fs/usr/src/linux-$VERSION-slitaz/slitaz/aufs2
25 cp -a $WOK/$WANTED/aufs2/Documentation \
26 $WOK/$WANTED/aufs2/fs $WOK/$WANTED/aufs2/include \
27 $fs/usr/src/linux-$VERSION-slitaz/slitaz/aufs2
28 fi
29 ln -s /usr/src/linux-$VERSION-slitaz \
30 $fs/lib/modules/$VERSION-slitaz/source
31 ln -s /usr/src/linux-$VERSION-slitaz \
32 $fs/lib/modules/$VERSION-slitaz/build
33 }
35 # Post install/remove commands for Tazpkg.
36 post_install()
37 {
38 local url
39 local patch_file
40 cd $1/usr/src/
41 url=$(cat linux-$VERSION-slitaz/slitaz/url)
42 wget -c $url
43 tar xjf $(basename $url)
44 mv linux-$VERSION-slitaz/slitaz linux-$VERSION
45 rm -rf linux-$VERSION-slitaz
46 mv linux-$VERSION linux-$VERSION-slitaz
47 cd linux-$VERSION-slitaz
48 cp -pa slitaz/aufs2/* .
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 }