wok-current annotate linux-source/receipt @ rev 2200
Add atm-tools
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 09 17:26:49 2009 +0000 (2009-02-09) |
parents | d5b93c942f68 |
children | 9059daaaa23d |
rev | line source |
---|---|
pascal@1093 | 1 # SliTaz package receipt. |
pascal@1093 | 2 |
pascal@1093 | 3 PACKAGE="linux-source" |
pascal@1093 | 4 VERSION="2.6.25.5" |
pascal@1093 | 5 CATEGORY="development" |
pascal@1093 | 6 SHORT_DESC="The Linux kernel source files." |
pascal@1093 | 7 MAINTAINER="pascal.bellard@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@1093 | 15 mkdir -p $fs/usr/src/linux-$VERSION-slitaz $fs/lib/modules/$VERSION-slitaz/ |
pascal@1093 | 16 ln -s linux-$VERSION-slitaz $fs/usr/src/linux |
pascal@1093 | 17 cp -a $src/slitaz $fs/usr/src/linux-$VERSION-slitaz |
pascal@1093 | 18 ln -s /usr/src/linux-$VERSION-slitaz $fs/lib/modules/$VERSION-slitaz/source |
pascal@1093 | 19 ln -s /usr/src/linux-$VERSION-slitaz $fs/lib/modules/$VERSION-slitaz/build |
pascal@1093 | 20 } |
pascal@1093 | 21 |
pascal@1093 | 22 # Post install/remove commands for Tazpkg. |
pascal@1093 | 23 post_install() |
pascal@1093 | 24 { |
pascal@1093 | 25 local url |
pascal@1093 | 26 local patch_file |
pascal@1093 | 27 cd $1/usr/src/ |
pascal@1093 | 28 url=$(cat linux-$VERSION-slitaz/slitaz/url) |
pascal@1093 | 29 wget -c $url |
pascal@1093 | 30 tar xjf $(basename $url) |
pascal@1093 | 31 mv linux-$VERSION-slitaz/slitaz linux-$VERSION |
pascal@1127 | 32 rm -rf linux-$VERSION-slitaz |
pascal@1093 | 33 mv linux-$VERSION linux-$VERSION-slitaz |
pascal@1093 | 34 cd linux-$VERSION-slitaz |
pascal@1093 | 35 while read patch_file; do |
pascal@1093 | 36 echo "Apply $patch_file" |
pascal@1093 | 37 patch -p1 < slitaz/$patch_file |
pascal@1093 | 38 done < slitaz/patches |
pascal@1093 | 39 cp slitaz/config .config |
pascal@1467 | 40 make oldconfig && make bzImage && make modules |
pascal@1127 | 41 cat <<EOT |
pascal@1127 | 42 ---- |
pascal@1127 | 43 To modify the kernel configuration: |
pascal@1127 | 44 $ cd /usr/src/linux-$VERSION-slitaz |
pascal@1127 | 45 $ make menuconfig |
pascal@1127 | 46 |
pascal@1127 | 47 To build the kernel and the modules: |
pascal@1127 | 48 $ cd /usr/src/linux-$VERSION-slitaz |
pascal@1127 | 49 $ make bzImage && make modules |
pascal@1127 | 50 |
pascal@1127 | 51 To install the new kernel and the modules: |
pascal@1127 | 52 $ make modules_install |
pascal@1127 | 53 $ cp -a arch/x86/boot/bzImage /boot/vmlinuz-$VERSION-slitaz |
pascal@1127 | 54 |
pascal@1127 | 55 See /usr/src/linux-$VERSION-slitaz/README |
pascal@1127 | 56 ---- |
pascal@1127 | 57 EOT |
pascal@1093 | 58 } |
pascal@1093 | 59 |
pascal@1094 | 60 pre_remove() |
pascal@1094 | 61 { |
pascal@1127 | 62 rm $(basename $(cat /usr/src/linux-$VERSION-slitaz/slitaz/url)) 2> /dev/null || true |
pascal@1094 | 63 } |
pascal@1094 | 64 |
pascal@1093 | 65 post_remove() |
pascal@1093 | 66 { |
pascal@1093 | 67 rm -rf /usr/src/linux-$VERSION-slitaz |
pascal@1093 | 68 } |
pascal@1093 | 69 |