wok-6.x annotate linux-source/receipt @ rev 1094
linux-source: fix removal
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jul 17 11:23:56 2008 +0000 (2008-07-17) |
parents | 34e504bf5887 |
children | 17474ac97dec |
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/" |
pascal@1093 | 10 DEPENDS="linux slitaz-toolchain" |
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@1093 | 32 rmdir 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@1093 | 40 } |
pascal@1093 | 41 |
pascal@1094 | 42 pre_remove() |
pascal@1094 | 43 { |
pascal@1094 | 44 rm $(basename $(cat /usr/src/linux-$VERSION-slitaz/slitaz/url)) |
pascal@1094 | 45 } |
pascal@1094 | 46 |
pascal@1093 | 47 post_remove() |
pascal@1093 | 48 { |
pascal@1093 | 49 rm -rf /usr/src/linux-$VERSION-slitaz |
pascal@1093 | 50 } |
pascal@1093 | 51 |