wok-next view linux-zram/receipt @ rev 19592

Busybox: stolen 1:1 from rolling wok.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Jan 21 16:00:08 2017 +0200 (2017-01-21)
parents 4197dd116ba7
children 960a052d15d3
line source
1 # SliTaz package receipt.
3 PACKAGE="linux-zram"
4 VERSION="4.9.0"
5 CATEGORY="base-system"
6 SHORT_DESC="The Linux Kernel compressed caching support"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://www.kernel.org/"
10 CONFIG_FILES="/etc/compcache.conf"
11 PROVIDE="compcache"
13 WANTED="linux"
14 DEPENDS="linux"
16 # Rules to gen a SliTaz package suitable for Tazpkg.
17 genpkg_rules()
18 {
19 . $wanted_stuff/copy_modules.sh
20 copy_modules drivers/block/zram
22 mkdir -p $fs/etc/init.d
23 install -o root -m 755 $stuff/compcache $fs/etc/init.d/
24 install -o root -m 644 $stuff/compcache.conf $fs/etc/
25 }
27 # Post install/remove commands for Tazpkg.
28 post_install()
29 {
30 chroot "$1/" depmod -a $VERSION-slitaz &&
31 RAM=`cat /proc/meminfo | grep MemTotal | sed s/[^0-9]//g` &&
32 echo "SIZE_KB="$(($RAM/2)) > /etc/compcache.conf
33 cat <<EOT
35 You can add compressed swap according /etc/compcache.conf configuration with:
36 # /etc/init.d/compcache start
37 Or add compcache in the RUN_DAEMONS list of /etc/rcS.conf.
38 EOT
39 }