diff options
author | 2010-03-20 08:20:37 +0900 | |
---|---|---|
committer | 2010-03-20 08:20:37 +0900 | |
commit | 2b86d60ae6612e6c5daffb9dcb85cd6ae7bf77a3 (patch) | |
tree | 398b4ad8e678690498ff0d3ca219066d50e64f36 | |
parent | dev-ruby/rubytter: Version bumped. (diff) | |
download | matsuu-2b86d60ae6612e6c5daffb9dcb85cd6ae7bf77a3.tar.gz matsuu-2b86d60ae6612e6c5daffb9dcb85cd6ae7bf77a3.tar.bz2 matsuu-2b86d60ae6612e6c5daffb9dcb85cd6ae7bf77a3.zip |
sys-block/compcache: Version bumped.
-rw-r--r-- | sys-block/compcache/Manifest | 6 | ||||
-rw-r--r-- | sys-block/compcache/compcache-0.6.2.ebuild | 63 | ||||
-rw-r--r-- | sys-block/compcache/compcache-9999.ebuild | 43 | ||||
-rw-r--r-- | sys-block/compcache/files/conf.d-compcache | 15 | ||||
-rw-r--r-- | sys-block/compcache/files/init.d-compcache | 59 |
5 files changed, 176 insertions, 10 deletions
diff --git a/sys-block/compcache/Manifest b/sys-block/compcache/Manifest index bf15654..27f8aab 100644 --- a/sys-block/compcache/Manifest +++ b/sys-block/compcache/Manifest @@ -1,3 +1,7 @@ +AUX conf.d-compcache 425 RMD160 88ba1529cdd13a9e835076c658592b965c9ba8f8 SHA1 589c57449414d86d090d96f3406f26d9f2093126 SHA256 9018f2d9bc83730c10686c3be7d932cc5457033818b7ebbbfab047b2af8889ed +AUX init.d-compcache 1229 RMD160 2f96e600d53d15c5bc5f7cce48fd5953a561726c SHA1 be6ea89657263fa42e2ae73e91a698ec86e6baaf SHA256 31a29b2a8678c3d82647172deea6e2f51aa16bf23ebf7e5870892c5838756208 +DIST compcache-0.6.2.tar.gz 26618 RMD160 495f1fcd76f9585192327d33ab2f6f667b611c6c SHA1 d2844aff60517c93477031df0705553f1ee7e743 SHA256 969e39aa08c3c65fe104777156caef3e9c58fc87720d45801a6dce04745abac3 DIST compcache-0.6.tar.gz 33881 RMD160 3305a428247d7e187a43fba84104ff0ca8ff2daf SHA1 4e9bada83a32654bcb18a8dc5830a13c43848547 SHA256 e5f697be6c1b7bfb9ac9ba5b8d836ff20f880c161f998c482caba83caf443c0c +EBUILD compcache-0.6.2.ebuild 1560 RMD160 550cde837afb230ddd84611c24ba59edc44d33a5 SHA1 b1df2b61f2fc17ef13d626db36ef8a2738577ed9 SHA256 7c6d2b540166db68d6d94201edb277b64fb6966b8faa5445501d9df09bd62099 EBUILD compcache-0.6.ebuild 1099 RMD160 4f8850a7740a7233ff9b63afe14adb738f7e8c68 SHA1 06d388559128bb1807910665d6a24593c6888496 SHA256 60725c8867c41502acb42fdd47b3ebbc58f9d6e71b97582213b10512026cdd50 -EBUILD compcache-9999.ebuild 1101 RMD160 e13ff6cd525bf311b2ed52964632aa5e92b6a5d0 SHA1 5b40e3c5d0f53c15824ddab4209814db55347b74 SHA256 6a4f9224363053c2e1efa2b71755a1741e1d142604f5a5b95e792513ce7b5696 +EBUILD compcache-9999.ebuild 1653 RMD160 1fa339bf6d90adcb64b32e536125bfb4f8630676 SHA1 46cea7b7e232972a3fcdc771b31efb13b14bde81 SHA256 218516425d1cb0a77c6a93c6c3a831ee5b290320f8c241c129d6044181371e2b diff --git a/sys-block/compcache/compcache-0.6.2.ebuild b/sys-block/compcache/compcache-0.6.2.ebuild new file mode 100644 index 0000000..c030cfe --- /dev/null +++ b/sys-block/compcache/compcache-0.6.2.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" +inherit eutils linux-mod toolchain-funcs + +DESCRIPTION="Compressed RAM as fast swap" +HOMEPAGE="http://compcache.googlecode.com/" +SRC_URI="http://compcache.googlecode.com/files/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +KEYWORDS="~arm ~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/linux-sources-2.6" +RDEPEND="${DEPEND}" + +pkg_setup() { + if kernel_is -le 2 6 32; then + BUILD_PARAMS='KV_OUT_DIR="${KV_OUT_DIR}"' + BUILD_TARGETS="all" + CONFIG_CHECK="LZO_COMPRESS LZO_DECOMPRESS SWAP" + MODULE_NAMES="ramzswap(compcache:${S}:${S})" + MODULESD_RAMZSWAP_DOCS="Changelog README load_modules.sh unload_modules.sh" + MODULESD_RAMZSWAP_EXAMPLES=('ramzswap num_devices=1') + linux-mod_pkg_setup + else + CONFIG_CHECK="~RAMZSWAP" + linux-info_pkg_setup + fi +} + +src_prepare() { + find . -name Makefile -exec sed -i \ + -e 's:make:$(MAKE):g' \ + -e "s:@gcc:$(tc-getCC):g" \ + -e 's#/lib/modules/$(shell uname -r)/build#"$(KV_OUT_DIR)"#' \ + {} \; || die +} + +src_compile() { + if kernel_is -le 2 6 32; then + linux-mod_src_compile + else + emake -C sub-projects/rzscontrol || die + fi +} + +src_install() { + if kernel_is -le 2 6 32; then + linux-mod_src_install + fi + + dosbin sub-projects/rzscontrol/rzscontrol || die + doman sub-projects/rzscontrol/man/rzscontrol.1 || die + dohtml sub-projects/rzscontrol/man/rzscontrol.html || die + + newinitd "${FILESDIR}/init.d-${PN}" ${PN} || die + newconfd "${FILESDIR}/conf.d-${PN}" ${PN} || die + + dodoc Changelog README || die +} diff --git a/sys-block/compcache/compcache-9999.ebuild b/sys-block/compcache/compcache-9999.ebuild index c726331..35bbeda 100644 --- a/sys-block/compcache/compcache-9999.ebuild +++ b/sys-block/compcache/compcache-9999.ebuild @@ -3,7 +3,7 @@ # $Header: $ EAPI="2" -inherit linux-mod mercurial +inherit eutils linux-mod mercurial toolchain-funcs DESCRIPTION="Compressed RAM as fast swap" HOMEPAGE="http://compcache.googlecode.com/" @@ -12,7 +12,7 @@ SRC_URI="" EHG_REPO_URI="https://compcache.googlecode.com/hg/" LICENSE="GPL-2 LGPL-2.1" -KEYWORDS="~amd64 ~x86" +KEYWORDS="~arm ~amd64 ~x86" IUSE="" DEPEND=">=virtual/linux-sources-2.6" @@ -20,23 +20,48 @@ RDEPEND="${DEPEND}" S="${WORKDIR}/hg" -BUILD_PARAMS='KV_OUT_DIR="${KV_OUT_DIR}"' -BUILD_TARGETS="all" -CONFIG_CHECK="LZO_COMPRESS LZO_DECOMPRESS" # CRYPTO_LZO -MODULE_NAMES="ramzswap(compcache:${S}:${S})" -MODULESD_RAMZSWAP_DOCS="Changelog README load_modules.sh unload_modules.sh" -MODULESD_RAMZSWAP_EXAMPLES=('num_devices="1"') +pkg_setup() { + if kernel_is -le 2 6 32; then + BUILD_PARAMS='KV_OUT_DIR="${KV_OUT_DIR}"' + BUILD_TARGETS="all" + CONFIG_CHECK="LZO_COMPRESS LZO_DECOMPRESS SWAP" + MODULE_NAMES="ramzswap(compcache:${S}:${S})" + MODULESD_RAMZSWAP_DOCS="Changelog README load_modules.sh unload_modules.sh" + MODULESD_RAMZSWAP_EXAMPLES=('ramzswap num_devices=1') + linux-mod_pkg_setup + else + CONFIG_CHECK="~RAMZSWAP" + linux-info_pkg_setup + fi +} src_prepare() { find . -name Makefile -exec sed -i \ -e 's:make:$(MAKE):g' \ + -e "s:@gcc:$(tc-getCC):g" \ -e 's#/lib/modules/$(shell uname -r)/build#"$(KV_OUT_DIR)"#' \ {} \; || die } +src_compile() { + if kernel_is -le 2 6 32; then + linux-mod_src_compile + else + emake -C sub-projects/rzscontrol || die + fi +} + src_install() { - linux-mod_src_install + if kernel_is -le 2 6 32; then + linux-mod_src_install + fi dosbin sub-projects/rzscontrol/rzscontrol || die doman sub-projects/rzscontrol/man/rzscontrol.1 || die + dohtml sub-projects/rzscontrol/man/rzscontrol.html || die + + newinitd "${FILESDIR}/init.d-${PN}" ${PN} || die + newconfd "${FILESDIR}/conf.d-${PN}" ${PN} || die + + dodoc Changelog README || die } diff --git a/sys-block/compcache/files/conf.d-compcache b/sys-block/compcache/files/conf.d-compcache new file mode 100644 index 0000000..b61023b --- /dev/null +++ b/sys-block/compcache/files/conf.d-compcache @@ -0,0 +1,15 @@ +# CompCache settings... + +# load ramzswap kernel module on start? +LOAD_ON_START="yes" + +# unload ramzswap kernel module on stop? +UNLOAD_ON_STOP="yes" + +# number of device +NUM_DEVICES="1" + +# for each /dev/ramzswapN, specify these arguments for rszcontrol +# `man rzscontrol` for more informations. +#RAMZSWAP_OPTS_0="--backing_swap=/path/to/swap.file --memlimit_kb=10240 --disksize_kb=10240" +#RAMZSWAP_OPTS_1="--disksize_kb=20480" diff --git a/sys-block/compcache/files/init.d-compcache b/sys-block/compcache/files/init.d-compcache new file mode 100644 index 0000000..4a4e0a7 --- /dev/null +++ b/sys-block/compcache/files/init.d-compcache @@ -0,0 +1,59 @@ +#!/sbin/runscript +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + need localmount + after bootmisc modules +} + +start() { + if [ "${LOAD_ON_START}" = "yes" ] ; then + einfo "Loading ramzswap module..." + modprobe ramzswap num_devices=${NUM_DEVICES} + eend $? + fi + + for I in `seq 0 \`expr ${NUM_DEVICES} - 1\`` ; do + eval _a=\${RAMZSWAP_OPTS_${I}} + einfo "Enabling swap /dev/ramzswap${I}..." + rzscontrol "/dev/ramzswap${I}" --init $_a + swapon ${SWAPON_OPTS} "/dev/ramzswap${I}" + eend $? + done +} + +stop() { + for I in `seq 0 \`expr ${NUM_DEVICES} - 1\`` ; do + einfo "Disabling swap /dev/ramzswap${I}..." + swapoff "/dev/ramzswap${I}" && \ + rzscontrol "/dev/ramzswap${I}" --reset + eend $? + done + + if [ "${UNLOAD_ON_STOP}" = "yes" ] ; then + einfo "Unloading ramzswap module..." + rmmod ramzswap + eend $? + fi +} + +info() { + for I in `seq 0 \`expr ${NUM_DEVICES} - 1\`` ; do + rzscontrol "/dev/ramzswap${I}" --stats + done +} + +reload() { + for I in `seq 0 \`expr ${NUM_DEVICES} - 1\`` ; do + swapoff "/dev/ramzswap${I}" && \ + rzscontrol "/dev/ramzswap${I}" --reset && \ + swapon ${SWAPON_OPTS} "/dev/ramzswap${I}" + done +} + +restart() { + stop + start +} |