summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/mongodb/ChangeLog10
-rw-r--r--dev-db/mongodb/Manifest8
-rw-r--r--dev-db/mongodb/files/modify-post-strip.patch12
-rw-r--r--dev-db/mongodb/files/modify-testing.patch40
-rw-r--r--dev-db/mongodb/files/mongodb.confd11
-rw-r--r--dev-db/mongodb/files/mongodb.initd45
-rw-r--r--dev-db/mongodb/metadata.xml5
-rw-r--r--dev-db/mongodb/mongodb-0.9.6.ebuild59
8 files changed, 190 insertions, 0 deletions
diff --git a/dev-db/mongodb/ChangeLog b/dev-db/mongodb/ChangeLog
new file mode 100644
index 000000000..9ea4ff9be
--- /dev/null
+++ b/dev-db/mongodb/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for dev-db/mongodb
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 27 Jul 2009; Johan Bergström (jbergstroem) <bugs@bergstroem.nu>
+ +mongodb-0.9.6.ebuild, +files/modify-post-strip.patch,
+ +files/modify-testing.patch, +files/mongodb.confd, +files/mongodb.initd,
+ +metadata.xml:
+ New ebuild for bug 273259. Thanks to scarabeus and ssuominen
+
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
new file mode 100644
index 000000000..482a3dc0f
--- /dev/null
+++ b/dev-db/mongodb/Manifest
@@ -0,0 +1,8 @@
+AUX modify-post-strip.patch 429 RMD160 9c37623e3789e8c4610237b1230d7577314cbb2b SHA1 6cf124733e10d57f1079263d69fc0935f363fac6 SHA256 955a883d2c493c5f3815608f8e2767cbf566f5a1344447604249c84bb4fcc8a1
+AUX modify-testing.patch 1276 RMD160 a4cfdad3b9c6102d28f487ad009aabef581eabeb SHA1 bebd414e2d8af94b44dbcb81d92a7b1274cd5c86 SHA256 1e0ae2e54f22a28f6462ac37284dd0b8b4776e82373c4d25959c012998a445ce
+AUX mongodb.confd 285 RMD160 cc5e3ab24a9880a19392a7416d23d1ae7a328e11 SHA1 7c4b720ea5b0afd2fa88a6adc2d8a2e356691413 SHA256 8dfedbb433e11f8ed6ec8159ed5c02f94c22f86006cda21f0b2bb59ebe50b2ad
+AUX mongodb.initd 1024 RMD160 cd38a158302270c75d2e12360f6d7fab259aca66 SHA1 f841675161b318ee7647e028df38b03ae6e4c647 SHA256 a9136dbcbd9626d80988c2f46c73af6b2f23bc4af52c9f68d33d2feaa1649dcb
+DIST mongodb-0.9.6.tar.gz 3896696 RMD160 596295f9c572bfecad5fa03461a9aad21bb4742f SHA1 cc3552724d3c5e4179dfbd3a509276a0acdc8617 SHA256 0f536e1a7d7645c5eaa9819a3c844d2c6b28d5862603ea1e8d145bd853f26e2c
+EBUILD mongodb-0.9.6.ebuild 1327 RMD160 69305306dac76b2089d73dad2ad9f45f01990c20 SHA1 a3c5c85bb7ba867af9052415ebaae14143a0d48e SHA256 876d36721911f9ab80f093656d6a0e8a522a7cc1d9c69432116ac0170fb278ef
+MISC ChangeLog 395 RMD160 1ad49b0e77db8cb90db75f7521dbd9483fc83836 SHA1 f0dbbc563499a8624c615bbde4a91917d38db0aa SHA256 362598168a048025b4751491831f4e2dd39b21163b0457f92a273a59d31a954e
+MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42
diff --git a/dev-db/mongodb/files/modify-post-strip.patch b/dev-db/mongodb/files/modify-post-strip.patch
new file mode 100644
index 000000000..526cc6be3
--- /dev/null
+++ b/dev-db/mongodb/files/modify-post-strip.patch
@@ -0,0 +1,12 @@
+--- SConstruct.orig 2009-07-14 12:10:40.000000000 +0200
++++ SConstruct 2009-07-14 12:11:31.000000000 +0200
+@@ -1134,8 +1134,6 @@
+ fullInstallName = installDir + "/bin/" + name
+
+ allBinaries += [ name ]
+- if solaris or linux:
+- e.AddPostAction( inst, e.Action( 'strip ' + fullInstallName ) )
+
+ if linux and str( COMMAND_LINE_TARGETS[0] ) == "s3dist":
+ e.AddPostAction( inst , checkGlibc )
+
diff --git a/dev-db/mongodb/files/modify-testing.patch b/dev-db/mongodb/files/modify-testing.patch
new file mode 100644
index 000000000..dc9259235
--- /dev/null
+++ b/dev-db/mongodb/files/modify-testing.patch
@@ -0,0 +1,40 @@
+diff -u SConstruct.old SConstruct
+--- SConstruct.old 2009-06-10 12:47:25.000000000 +0200
++++ SConstruct 2009-06-10 12:47:42.000000000 +0200
+@@ -811,9 +811,11 @@
+ Exit( 1 )
+
+ def ensureTestDirs():
+- ensureDir( "/tmp/unittest/" )
+- ensureDir( "/data/" )
+- ensureDir( "/data/db/" )
++ ensureDir( "testdir/" )
++ ensureDir( "testdir/tmp/" )
++ ensureDir( "testdir/tmp/unittest/" )
++ ensureDir( "testdir/data/" )
++ ensureDir( "testdir/data/db/" )
+
+ def testSetup( env , target , source ):
+ ensureTestDirs()
+@@ -890,7 +892,7 @@
+ mongodForTestsPort = "40000"
+ import os
+ ensureTestDirs()
+- dirName = "/data/db/sconsTests/"
++ dirName = "testdir/data/db/sconsTests/"
+ ensureDir( dirName )
+ from subprocess import Popen
+ mongodForTests = Popen( [ mongod[0].abspath, "--port", mongodForTestsPort, "--dbpath", dirName ] )
+diff -u dbtests/dbtests.cpp.old dbtests/dbtests.cpp
+--- dbtests/dbtests.cpp.old 2009-06-10 13:10:43.000000000 +0200
++++ dbtests/dbtests.cpp 2009-06-09 15:37:04.000000000 +0200
+@@ -35,7 +35,7 @@
+ namespace mongo {
+ extern const char* dbpath;
+ } // namespace mongo
+-string dbpathSpec = "/tmp/unittest/";
++string dbpathSpec = "testdir/tmp/unittest/";
+
+ Suite::~Suite() {
+ DBDirectClient c;
+
diff --git a/dev-db/mongodb/files/mongodb.confd b/dev-db/mongodb/files/mongodb.confd
new file mode 100644
index 000000000..bc1660130
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.confd
@@ -0,0 +1,11 @@
+# Mongodb essentials
+MONGODB_EXEC="/usr/bin/mongod"
+MONGODB_DATA="/var/lib/mongodb"
+MONGODB_USER="mongodb"
+MONGODB_PID_FILE="/var/run/mongodb/mongodb.pid"
+
+MONGODB_IP="127.0.0.1"
+MONGODB_PORT="27017"
+
+# Set extra options here, such as disabling the admin web server
+MONGODB_OPTIONS=""
diff --git a/dev-db/mongodb/files/mongodb.initd b/dev-db/mongodb/files/mongodb.initd
new file mode 100644
index 000000000..97d2053fe
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.initd
@@ -0,0 +1,45 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ if [ -z "$MONGODB_PID_FILE" ] ; then
+ ewarn "MONGODB_PID_FILE must be set"
+ return -1
+ fi
+ if [ -z "$MONGODB_USER" ] ; then
+ ewarn "ERROR: MONGODB_USER must be set"
+ return -1
+ fi
+
+ args=""
+ if [ -n "$MONGODB_DATA" ] ; then
+ args="$args --dbpath $MONGODB_DATA"
+ fi
+ if [ -n "$MONGODB_PORT" ] ; then
+ args="$args --port $MONGODB_PORT"
+ fi
+ if [ -n "$MONGODB_IP" ] ; then
+ args="$args --bind_ip $MONGODB_IP"
+ fi
+ if [ -n "$MONGODB_OPTIONS" ] ; then
+ args="$args $MONGODB_OPTIONS"
+ fi
+
+ start-stop-daemon --background --start --user ${MONGODB_USER} --pidfile \
+ "${MONGODB_PID_FILE}" --make-pidfile --exec ${MONGODB_EXEC} \
+ -- ${args} run
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec ${EXEC} --pidfile ${MONGODB_PID_FILE}
+ eend $? "Failed to stop ${SVCNAME}"
+}
diff --git a/dev-db/mongodb/metadata.xml b/dev-db/mongodb/metadata.xml
new file mode 100644
index 000000000..7e3286984
--- /dev/null
+++ b/dev-db/mongodb/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>maintainer-wanted</herd>
+</pkgmetadata>
diff --git a/dev-db/mongodb/mongodb-0.9.6.ebuild b/dev-db/mongodb/mongodb-0.9.6.ebuild
new file mode 100644
index 000000000..94a5239d4
--- /dev/null
+++ b/dev-db/mongodb/mongodb-0.9.6.ebuild
@@ -0,0 +1,59 @@
+# 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-b57918b3a468ba5882f226fc54e00321c20d7f0d
+
+pkg_setup() {
+ sconsopts=$(echo "${MAKEOPTS}" | sed -ne "/-j/ { s/.*\(-j[0-9]\+\).*/\1/; p }")
+
+ enewgroup mongodb
+ enewuser mongodb -1 /sbin/nologin /var/lib/${PN} mongodb
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/modify-*.patch
+}
+
+src_compile() {
+ scons ${sconsopts} all || die "Compile failed"
+}
+
+src_install() {
+ scons 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
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} || die "Install failed"
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} || die "Install failed"
+}
+
+src_test() {
+ scons ${sconsopts} smoke test || die "Tests failed"
+}