wok-current view linux-source/receipt @ rev 1093

Add linux-source
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jul 17 09:13:52 2008 +0000 (2008-07-17)
parents
children 05c1d9e27c1f
line source
1 # SliTaz package receipt.
3 PACKAGE="linux-source"
4 VERSION="2.6.25.5"
5 CATEGORY="development"
6 SHORT_DESC="The Linux kernel source files."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 WANTED="linux"
9 WEB_SITE="http://www.kernel.org/"
10 DEPENDS="linux slitaz-toolchain"
12 # Rules to gen a SliTaz package suitable for Tazpkg.
13 genpkg_rules()
14 {
15 mkdir -p $fs/usr/src/linux-$VERSION-slitaz $fs/lib/modules/$VERSION-slitaz/
16 ln -s linux-$VERSION-slitaz $fs/usr/src/linux
17 cp -a $src/slitaz $fs/usr/src/linux-$VERSION-slitaz
18 ln -s /usr/src/linux-$VERSION-slitaz $fs/lib/modules/$VERSION-slitaz/source
19 ln -s /usr/src/linux-$VERSION-slitaz $fs/lib/modules/$VERSION-slitaz/build
20 }
22 # Post install/remove commands for Tazpkg.
23 post_install()
24 {
25 local url
26 local patch_file
27 cd $1/usr/src/
28 url=$(cat linux-$VERSION-slitaz/slitaz/url)
29 wget -c $url
30 tar xjf $(basename $url)
31 mv linux-$VERSION-slitaz/slitaz linux-$VERSION
32 rmdir linux-$VERSION-slitaz
33 mv linux-$VERSION linux-$VERSION-slitaz
34 cd linux-$VERSION-slitaz
35 while read patch_file; do
36 echo "Apply $patch_file"
37 patch -p1 < slitaz/$patch_file
38 done < slitaz/patches
39 cp slitaz/config .config
40 }
42 post_remove()
43 {
44 rm $(basename $(cat /usr/src/linux-$VERSION-slitaz/slitaz/url))
45 rm -rf /usr/src/linux-$VERSION-slitaz
46 }