wok-next view compcache/receipt @ rev 13388

Add autossh
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Sep 24 10:21:41 2012 +0200 (2012-09-24)
parents cbfb348cb173
children
line source
1 # SliTaz package receipt.
3 PACKAGE="linux-zram"
4 VERSION="3.2.14"
5 BASEVER="${VERSION:0:3}"
6 CATEGORY="base-system"
7 SHORT_DESC="Compressed caching"
8 MAINTAINER="devel@slitaz.org"
9 WEB_SITE="http://www.kernel.org/"
10 WANTED="linux"
11 PROVIDE="compcache"
13 DEPENDS="linux"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
18 KERNEL_VERSION=$(grep ^VERSION= $WOK/linux/receipt | \
19 cut -d "=" -f2 | sed -e 's/"//g')
20 EXTRAVERSION=_$KERNEL_VERSION
22 mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc \
23 $fs/etc/init.d \
24 $fs/usr/bin
26 install -o root -m 644 $src/ramzswap.ko \
27 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc
28 cp -a $src/sub-projects/rzscontrol/rzscontrol $fs/usr/bin
30 for i in $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc/*.ko ; do
31 lzma e $i $i.gz && rm -f $i
32 done
33 install -o root -m 755 $stuff/compcache $fs/etc/init.d/
34 install -o root -m 644 $stuff/compcache.conf $fs/etc/
35 }
37 post_install()
38 {
39 echo "Processing post-install commands..."
40 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
41 }
43 post_remove()
44 {
45 echo "Processing post-remove commands..."
46 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
47 }
48 # Rules to gen a SliTaz package suitable for Tazpkg.
49 genpkg_rules()
50 {
51 local path
52 path=lib/modules/$BASEVER-slitaz/kernel
53 mkdir -p $fs/$path $fs/etc
54 export src
55 export _pkg
56 $wanted_stuff/list_modules.sh fs/${PACKAGE#*-} | while read module; do
57 dir=$path/$(dirname $module)
58 [ -d $fs/$dir ] || mkdir -p $fs/$dir
59 cp -a $_pkg/$path/$module $fs/$dir
60 done
61 touch $fs/etc/filesystems
62 }
64 # Post install/remove commands for Tazpkg.
65 post_install()
66 {
67 grep -qs ^${PACKAGE#*-}$ $1/etc/filesystems || \
68 echo "${PACKAGE#*-}" >> $1/etc/filesystems
69 chroot "$1/" depmod -a $BASEVER-slitaz
70 }
72 post_remove()
73 {
74 sed -i "/^${PACKAGE#*-}\$/d" $1/etc/filesystems
75 chroot "$1/" depmod -a $BASEVER-slitaz
76 }