wok-6.x annotate compcache/receipt @ rev 1975

Add compcache
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jan 03 12:12:15 2009 +0000 (2009-01-03)
parents
children bfd8ed4b253e
rev   line source
pascal@1975 1 # SliTaz package receipt.
pascal@1975 2
pascal@1975 3 PACKAGE="compcache"
pascal@1975 4 VERSION="0.4"
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@1975 11 BUILD_DEPENDS="lzma"
pascal@1975 12
pascal@1975 13 # Rules to configure and make the package.
pascal@1975 14 compile_rules()
pascal@1975 15 {
pascal@1975 16
pascal@1975 17 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g`
pascal@1975 18 if [ ! -d $WOK/linux/linux-$KERNEL_VERSION ]; then
pascal@1975 19 tazwok cook linux
pascal@1975 20 fi
pascal@1975 21 cd $src
pascal@1975 22 find -name Makefile | xargs sed -i \
pascal@1975 23 "s|/lib/modules/\$(shell uname -r)/build|$WOK/linux/linux-$KERNEL_VERSION|"
pascal@1975 24 make KBUILD=$WOK/linux/linux-$KERNEL_VERSION KVER=$KERNEL_VERSION
pascal@1975 25 }
pascal@1975 26
pascal@1975 27 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1975 28 genpkg_rules()
pascal@1975 29 {
pascal@1975 30 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g`
pascal@1975 31 EXTRAVERSION=_$KERNEL_VERSION
pascal@1975 32
pascal@1975 33 mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc $fs/etc/init.d
pascal@1975 34
pascal@1975 35 install -o root -m 755 $src/compcache.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc
pascal@1975 36 install -o root -m 755 $src/sub-projects/allocators/tlsf-kmod/tlsf.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc
pascal@1975 37 install -o root -m 755 $src/sub-projects/compression/lzo-kmod/lzo1x_compress.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc
pascal@1975 38 install -o root -m 755 $src/sub-projects/compression/lzo-kmod/lzo1x_decompress.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc
pascal@1975 39
pascal@1975 40 for i in $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc/*.ko ; do
pascal@1975 41 lzma e $i $i.gz && rm -f $i
pascal@1975 42 done
pascal@1975 43 install -o root -m 755 ./stuff/compcache $fs/etc/init.d/
pascal@1975 44 install -o root -m 755 ./stuff/compcache.conf $fs/etc/
pascal@1975 45 }
pascal@1975 46
pascal@1975 47 post_install()
pascal@1975 48 {
pascal@1975 49 echo "Processing post-install commands..."
pascal@1975 50 depmod -a -b "$1/" ${EXTRAVERSION#_}-slitaz
pascal@1975 51 }
pascal@1975 52
pascal@1975 53 post_remove()
pascal@1975 54 {
pascal@1975 55 echo "Processing post-remove commands..."
pascal@1975 56 depmod -a
pascal@1975 57 }