summaryrefslogtreecommitdiff
blob: 4776ba5d47438a3364fc0eeeda79fece6567b067 (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
64
65
66
67
68
69
70
71
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/elliptics/elliptics-2.19.2.6.ebuild,v 1.3 2015/04/18 12:35:44 swegener Exp $

EAPI=4
PYTHON_DEPEND="2"

DESCRIPTION="Elliptics network is a fault tolerant key/value storage without dedicated metadata servers"
HOMEPAGE="http://www.ioremap.net/projects/elliptics"
LICENSE="GPL-2"
SLOT="0"

inherit user eutils python flag-o-matic cmake-utils

KEYWORDS="~x86 ~amd64"
IUSE="fastcgi python"
RDEPEND="app-arch/snappy
	dev-libs/openssl
	fastcgi? ( dev-libs/fcgi )
	net-misc/elliptics-eblob
	dev-libs/boost[python]
	dev-libs/libevent
	dev-libs/leveldb
	dev-libs/smack
	dev-db/kyotocabinet
	net-misc/cocaine-core
	net-libs/zeromq"
DEPEND="${RDEPEND}"

SRC_URI="https://github.com/reverbrain/elliptics/archive/v${PV}.tar.gz -> ${P}.tar.gz"

pkg_setup() {
	enewgroup elliptics
	enewuser elliptics -1 -1 /dev/null elliptics
	python_set_active_version 2
	python_pkg_setup
}

src_configure(){
	use python && filter-ldflags -Wl,--as-needed
	cmake-utils_src_configure
}

src_install(){
	cmake-utils_src_install

	use fastcgi && example/fcgi/lighttpd-fastcgi-elliptics.conf
	dodoc doc/design_notes.txt \
		doc/io_storage_backend.txt \
		example/EXAMPLE \
		example/ioserv.conf

	# init script stuff
	# too many changes since the old version, needs to be re-added
	#newinitd "${FILESDIR}"/elliptics.initd elliptics || die
	#newconfd "${FILESDIR}"/elliptics.confd elliptics || die

	# tune default config
	sed -i 's#log = /dev/stderr#log = syslog#' "${S}/example/ioserv.conf"
	sed -i 's#root = /tmp/root#root = /var/spool/elliptics#' "${S}/example/ioserv.conf"
	sed -i 's#daemon = 0#daemon = 1#' "${S}/example/ioserv.conf"
	sed -i 's#history = /tmp/history#history = /var/run/elliptics#' "${S}/example/ioserv.conf"

	# configs
	insinto /etc/elliptics
	doins "${S}/example/ioserv.conf"

	keepdir /var/{spool,run}/elliptics
	fowners elliptics:elliptics /var/{spool,run}/elliptics
	fperms 0750 /var/{spool,run}/elliptics
}