wok-4.x annotate compcache/receipt @ rev 9699

Be less entousiast and sed only 13 pkgs :-)
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 08 00:40:27 2011 +0200 (2011-05-08)
parents 0b4cf0d9e1b5
children
rev   line source
pascal@1975 1 # SliTaz package receipt.
pascal@1975 2
pascal@1975 3 PACKAGE="compcache"
jozee@5598 4 VERSION="0.6.2"
pascal@1975 5 CATEGORY="system-tools"
pascal@1975 6 SHORT_DESC="Compressed caching"
pascal@1975 7 MAINTAINER="fabrice.thiroux@free.fr"
pascal@1975 8 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@1975 9 WEB_SITE="http://code.google.com/p/compcache/"
pascal@1975 10 WGET_URL="http://compcache.googlecode.com/files/$TARBALL"
pankso@9699 11
pascal@2926 12 DEPENDS="linux"
slaxemulator@7153 13 BUILD_DEPENDS="lzma linux-module-headers"
pascal@1975 14
pascal@1975 15 # Rules to configure and make the package.
pascal@1975 16 compile_rules()
pascal@1975 17 {
pankso@9699 18 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | \
pankso@9699 19 cut -d "=" -f2 | sed -e 's/"//g'`
pankso@9699 20 cd $src
pankso@9699 21
pankso@9699 22 # Fix build with kernel 2.6.34
pankso@9699 23 patch -p1 < $stuff/compcache-0.6.2-linux-2.6.34.u || return 1
pankso@9699 24
pankso@9699 25 find -name Makefile | xargs sed -i \
slaxemulator@7153 26 "s|/lib/modules/\$(shell uname -r)/build|/usr/src/linux|"
pankso@9699 27 make KBUILD=/usr/src/linux KVER=$KERNEL_VERSION
pascal@1975 28 }
pascal@1975 29
pascal@1975 30 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1975 31 genpkg_rules()
pascal@1975 32 {
pankso@9699 33 KERNEL_VERSION=$(grep ^VERSION= $WOK/linux/receipt | \
pankso@9699 34 cut -d "=" -f2 | sed -e 's/"//g')
pankso@9699 35 EXTRAVERSION=_$KERNEL_VERSION
pankso@9699 36
pankso@9699 37 mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc \
pankso@9699 38 $fs/etc/init.d \
pankso@9699 39 $fs/usr/bin
pankso@9699 40
pankso@9699 41 install -o root -m 644 $src/ramzswap.ko \
pankso@9699 42 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc
pankso@9699 43 cp -a $src/sub-projects/rzscontrol/rzscontrol $fs/usr/bin
pankso@9699 44
pankso@9699 45 for i in $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc/*.ko ; do
pankso@9699 46 lzma e $i $i.gz && rm -f $i
pankso@9699 47 done
pankso@9699 48 install -o root -m 755 $stuff/compcache $fs/etc/init.d/
pankso@9699 49 install -o root -m 644 $stuff/compcache.conf $fs/etc/
pascal@1975 50 }
pascal@1975 51
pascal@1975 52 post_install()
pascal@1975 53 {
pankso@9699 54 echo "Processing post-install commands..."
pankso@9699 55 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
pascal@1975 56 }
pascal@1975 57
pascal@1975 58 post_remove()
pascal@1975 59 {
pankso@9699 60 echo "Processing post-remove commands..."
pankso@9699 61 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
pascal@1975 62 }