wok-current annotate linux-zram/receipt @ rev 18743

linux*zram: add CONFIG_FILES
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Dec 25 17:07:16 2015 +0100 (2015-12-25)
parents 08cf996a2307
children 4197dd116ba7
rev   line source
pascal@13390 1 # SliTaz package receipt.
pascal@13390 2
pascal@13390 3 PACKAGE="linux-zram"
pascal@18296 4 VERSION="3.2.71"
pascal@13390 5 CATEGORY="base-system"
pascal@13390 6 SHORT_DESC="Compressed caching"
pascal@13390 7 MAINTAINER="devel@slitaz.org"
pascal@14657 8 LICENSE="GPL2"
pascal@13390 9 WEB_SITE="http://www.kernel.org/"
pascal@18743 10 CONFIG_FILES="/etc/compcache.conf"
pascal@13390 11 WANTED="linux"
pascal@13390 12 PROVIDE="compcache"
pascal@13390 13
pascal@13390 14 DEPENDS="linux"
pascal@13390 15
pascal@13390 16 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@13390 17 genpkg_rules()
pascal@13390 18 {
pascal@13390 19 local path
pankso@15855 20 path=lib/modules/$VERSION-slitaz/kernel
pascal@13390 21 mkdir -p $fs/$path $fs/etc/init.d
pankso@15855 22 export src install
pascal@13390 23 $wanted_stuff/list_modules.sh drivers/staging/zram | \
pascal@13390 24 while read module; do
pascal@13390 25 dir=$path/$(dirname $module)
pascal@13390 26 [ -d $fs/$dir ] || mkdir -p $fs/$dir
pascal@15603 27 cp -a $install/$path/$module $fs/$dir
pascal@13390 28 done
pascal@13390 29 install -o root -m 755 $stuff/compcache $fs/etc/init.d/
pascal@13390 30 install -o root -m 644 $stuff/compcache.conf $fs/etc/
pascal@13390 31 }
pascal@13390 32
pascal@13390 33 # Post install/remove commands for Tazpkg.
pascal@13390 34 post_install()
pascal@13390 35 {
psychomaniak@16965 36 chroot "$root/" depmod -a $VERSION-slitaz &&
psychomaniak@16965 37 RAM=`cat /proc/meminfo | grep MemTotal | sed s/[^0-9]//g` &&
psychomaniak@16965 38 echo "SIZE_KB="$(($RAM/2)) > /etc/compcache.conf
pascal@18743 39 cat <<EOT
pascal@18743 40 You can add compressed swap according /etc/compcache.conf configuration with:
pascal@18743 41
pascal@18743 42 # /etc/init.d/compcache start
pascal@18743 43
pascal@18743 44 Or add compcache in the RUN_DAEMONS list of /etc/rcS.conf.
pascal@18743 45 EOT
pascal@13390 46 }
pascal@13390 47
pascal@13390 48 post_remove()
pascal@13390 49 {
pankso@15855 50 chroot "$root/" depmod -a $VERSION-slitaz
pascal@13390 51 }
pascal@13390 52