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