blob: c870d0dc236403493463a763bd66f23495c06d8e (
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
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=2
inherit eutils
DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
HOMEPAGE="http://www.mongodb.org"
SRC_URI="http://github.com/mongodb/mongo/tarball/r${PV} -> ${P}.tar.gz"
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="dev-lang/spidermonkey
dev-libs/boost
dev-libs/libpcre"
DEPEND="${RDEPEND}
>=dev-util/scons-1.2.0-r1
test? ( dev-libs/unittest )"
S=${WORKDIR}/${PN}-mongo-eefb81258e5e37f9cd9c43edef16c774830983ac
pkg_setup() {
enewgroup mongodb
enewuser mongodb -1 -1 /var/lib/${PN} mongodb
}
src_prepare() {
epatch "${FILESDIR}"/modify-*.patch
}
src_compile() {
scons ${MAKEOPTS} all || die "Compile failed"
}
src_install() {
scons ${MAKEOPTS} install --prefix="${D}"/usr || die "Install failed"
for x in /var/{lib,log,run}/${PN}; do
dodir "${x}" || die "Install failed"
fowners mongodb:mongodb "${x}"
done
doman debian/mongo*.1 || die "Install failed"
newinitd "${FILESDIR}/${PN}.initd" ${PN} || die "Install failed"
newconfd "${FILESDIR}/${PN}.confd" ${PN} || die "Install failed"
}
src_test() {
scons ${MAKEOPTS} smoke test || die "Tests failed"
}
|