wok-current annotate compcache/receipt @ rev 7100

Add grep
author Paul Issott <paul@slitaz.org>
date Wed Nov 03 10:07:25 2010 +0000 (2010-11-03)
parents 5716a37ccf43
children d6292cae5538
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"
pascal@2926 11 DEPENDS="linux"
pascal@1975 12 BUILD_DEPENDS="lzma"
pascal@1975 13
pascal@1975 14 # Rules to configure and make the package.
pascal@1975 15 compile_rules()
pascal@1975 16 {
pascal@1975 17
erjo@1991 18 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
pascal@1975 19 if [ ! -d $WOK/linux/linux-$KERNEL_VERSION ]; then
pascal@1975 20 tazwok cook linux
pascal@1975 21 fi
pascal@1975 22 cd $src
erjo@5893 23
erjo@5893 24 # Fix build with kernel 2.6.34
erjo@5893 25 patch -p1 < ../stuff/compcache-0.6.2-linux-2.6.34.u || exit 1
erjo@5893 26
mimas@2291 27 find -name Makefile | xargs sed -i \
pascal@1975 28 "s|/lib/modules/\$(shell uname -r)/build|$WOK/linux/linux-$KERNEL_VERSION|"
pascal@1975 29 make KBUILD=$WOK/linux/linux-$KERNEL_VERSION KVER=$KERNEL_VERSION
pascal@1975 30 }
pascal@1975 31
pascal@1975 32 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1975 33 genpkg_rules()
pascal@1975 34 {
erjo@1991 35 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
pascal@1975 36 EXTRAVERSION=_$KERNEL_VERSION
pascal@1975 37
jozee@5599 38 mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc \
jozee@5599 39 $fs/etc/init.d \
jozee@5599 40 $fs/usr/bin
pascal@1975 41
jozee@5599 42 install -o root -m 644 $src/ramzswap.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc
jozee@5600 43 cp -a $src/sub-projects/rzscontrol/rzscontrol $fs/usr/bin
jozee@5599 44
mimas@2291 45 for i in $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc/*.ko ; do
mimas@2291 46 lzma e $i $i.gz && rm -f $i
pascal@1975 47 done
pascal@1975 48 install -o root -m 755 ./stuff/compcache $fs/etc/init.d/
mimas@2291 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 {
pascal@1975 54 echo "Processing post-install commands..."
pascal@2926 55 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
pascal@1975 56 }
pascal@1975 57
pascal@1975 58 post_remove()
pascal@1975 59 {
pascal@1975 60 echo "Processing post-remove commands..."
pascal@1975 61 depmod -a
pascal@1975 62 }