blob: c030cfe6dbebe16767105d06e70639290da442a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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
}
|