summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Albertson <ramereth@gentoo.org>2010-03-07 23:39:41 +0000
committerLance Albertson <ramereth@gentoo.org>2010-03-07 23:39:41 +0000
commite4df8cc577fde1b5aa2dbf276dfdcfae6041fe35 (patch)
tree65842f241582ba6e84c305b4db11afe31e207a7b /dev-db/mongodb
parentcorrected problem with prefix stuff (diff)
downloadhistorical-e4df8cc577fde1b5aa2dbf276dfdcfae6041fe35.tar.gz
historical-e4df8cc577fde1b5aa2dbf276dfdcfae6041fe35.tar.bz2
historical-e4df8cc577fde1b5aa2dbf276dfdcfae6041fe35.zip
Import ebuild from the sunrise overlay and apply various fixes. Resolves #273259
Package-Manager: portage-2.1.7.16/cvs/Linux x86_64
Diffstat (limited to 'dev-db/mongodb')
-rw-r--r--dev-db/mongodb/ChangeLog13
-rw-r--r--dev-db/mongodb/Manifest18
-rw-r--r--dev-db/mongodb/files/mongodb-1.2-modify-post-strip.patch11
-rw-r--r--dev-db/mongodb/files/mongodb-1.2-modify-testing.patch44
-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.xml18
-rw-r--r--dev-db/mongodb/mongodb-1.2.2.ebuild76
8 files changed, 236 insertions, 0 deletions
diff --git a/dev-db/mongodb/ChangeLog b/dev-db/mongodb/ChangeLog
new file mode 100644
index 000000000000..5fbef23a7f28
--- /dev/null
+++ b/dev-db/mongodb/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for dev-db/mongodb
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/ChangeLog,v 1.1 2010/03/07 23:39:41 ramereth Exp $
+
+*mongodb-1.2.2 (07 Mar 2010)
+
+ 07 Mar 2010; Lance Albertson <ramereth@gentoo.org> +mongodb-1.2.2.ebuild,
+ +files/mongodb-1.2-modify-post-strip.patch,
+ +files/mongodb-1.2-modify-testing.patch, +files/mongodb.confd,
+ +files/mongodb.initd, +metadata.xml:
+ Import ebuild from the sunrise overlay and apply various fixes. Resolves
+ #273259
+
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
new file mode 100644
index 000000000000..1495e5af63fc
--- /dev/null
+++ b/dev-db/mongodb/Manifest
@@ -0,0 +1,18 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX mongodb-1.2-modify-post-strip.patch 456 RMD160 dae0e77c3e6e0bb867b972586a907b438b2f9de8 SHA1 5021957e1165b897e3ec74d1d8b2d4d81f66809e SHA256 85f6c2eacdacc316c7ebb5ce373da7593daf32b097435c1deb2516a600f69ca3
+AUX mongodb-1.2-modify-testing.patch 1480 RMD160 3a9f0814141d55fccf41d45d9d376fefad273322 SHA1 18fb11b60afdbc489788ff9cb315700067a99807 SHA256 40646380a5ef57a3d92a7db9b606932f681432beb3054d885e7c5778f533470d
+AUX mongodb.confd 285 RMD160 cc5e3ab24a9880a19392a7416d23d1ae7a328e11 SHA1 7c4b720ea5b0afd2fa88a6adc2d8a2e356691413 SHA256 8dfedbb433e11f8ed6ec8159ed5c02f94c22f86006cda21f0b2bb59ebe50b2ad
+AUX mongodb.initd 1122 RMD160 126440360297ead030587bd328f040f0bb22e89c SHA1 0e94859933e60a9e75d11abee3d74ea191eeef94 SHA256 aa729ef902bd174039a168b7617046ce9db601917f0d606e1fe41e8cc0fefe12
+DIST mongodb-1.2.2.tar.gz 3876370 RMD160 f78d9145e9fa4aff69af872f89548baebc364d3c SHA1 a95c2c419a314c603a189cb7fab393d1c46357b3 SHA256 2c25c3db9bce1d78c36bbba0dde05a0dceb0133eda6036131bf3e8dec59c2148
+EBUILD mongodb-1.2.2.ebuild 1920 RMD160 32da0cf9cb8ac043d2320f8b533de81cab78721e SHA1 d11e28e89bf3f31bb3d0a17c2fe04dae33d4bf8b SHA256 3c61dfe675fe488a68b2cc7a0adf14353284d555884d533d29d22186c07ce599
+MISC ChangeLog 545 RMD160 d649e4fd43c6b703df2e06c5fad97c59458aefcd SHA1 a332fcbcf26a99ae41242a47f64f8ca7b638ca76 SHA256 5b8bab723f9e2606f675a5cf1daa2d4bbb039030674f3b136de82fbee99cf3b7
+MISC metadata.xml 628 RMD160 e8915a5fd2f27054d32e2ab8e65e00b748b00996 SHA1 cc99b68bb5e305562a69c0b439c4fe9a23716df8 SHA256 35f0587d94487ff4e0de0f6fac0a879aeeb9d0ef86b988fea4264e31d4215539
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.11 (GNU/Linux)
+
+iD8DBQFLlDi/QW+hXSf0t0IRAjNmAJ9oFjP9k6CC+ojGDsdIT64Dh/0FSgCeM68K
+8GCHmSS2b2k2rno26RFllRI=
+=i5a9
+-----END PGP SIGNATURE-----
diff --git a/dev-db/mongodb/files/mongodb-1.2-modify-post-strip.patch b/dev-db/mongodb/files/mongodb-1.2-modify-post-strip.patch
new file mode 100644
index 000000000000..b10de0e14f84
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-1.2-modify-post-strip.patch
@@ -0,0 +1,11 @@
+--- SConstruct 2009-10-17 15:22:09.000000000 +0200
++++ SConstruct.new 2009-10-17 15:23:31.000000000 +0200
+@@ -1240,8 +1240,6 @@
+ fullInstallName = installDir + "/bin/" + name
+
+ allBinaries += [ name ]
+- if solaris or linux:
+- e.AddPostAction( inst, e.Action( 'strip ' + fullInstallName ) )
+
+ if linux and len( COMMAND_LINE_TARGETS ) == 1 and str( COMMAND_LINE_TARGETS[0] ) == "s3dist":
+ e.AddPostAction( inst , checkGlibc )
diff --git a/dev-db/mongodb/files/mongodb-1.2-modify-testing.patch b/dev-db/mongodb/files/mongodb-1.2-modify-testing.patch
new file mode 100644
index 000000000000..31bda47c0ce7
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-1.2-modify-testing.patch
@@ -0,0 +1,44 @@
+--- SConstruct.old 2009-10-17 15:26:14.000000000 +0200
++++ SConstruct 2009-10-17 15:29:52.000000000 +0200
+@@ -995,15 +995,17 @@
+ 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()
+
+ if len( COMMAND_LINE_TARGETS ) == 1 and str( COMMAND_LINE_TARGETS[0] ) == "test":
+- ensureDir( "/tmp/unittest/" );
++ ensureDir( "testdir/tmp/unittest/" );
+
+ addSmoketest( "smoke", [ add_exe( "test" ) ] , [ test[ 0 ].abspath ] )
+ addSmoketest( "smokePerf", [ "perftest" ] , [ perftest[ 0 ].abspath ] )
+@@ -1072,7 +1074,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 ] )
+
+--- dbtests/dbtests.cpp 2009-10-17 16:40:46.000000000 +0200
++++ dbtests/dbtests.cpp.new 2009-10-17 16:40:54.000000000 +0200
+@@ -22,6 +22,6 @@
+ #include "dbtests.h"
+
+ int main( int argc, char** argv ) {
+- return Suite::run(argc, argv, "/tmp/unittest");
++ return Suite::run(argc, argv, "testdir/tmp/unittest");
+ }
+
diff --git a/dev-db/mongodb/files/mongodb.confd b/dev-db/mongodb/files/mongodb.confd
new file mode 100644
index 000000000000..bc1660130ce4
--- /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 000000000000..9ddd60564688
--- /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: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mongodb.initd,v 1.1 2010/03/07 23:39:39 ramereth Exp $
+
+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 000000000000..a6e6de426e99
--- /dev/null
+++ b/dev-db/mongodb/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd></herd>
+ <maintainer>
+ <email>ramereth@gentoo.org</email>
+ <name>Lance Albertson</name>
+ </maintainer>
+ <longdescription lang="en">
+ MongoDB (from "humongous") is a scalable, high-performance, open source,
+ schema-free, document-oriented database. Written in C++, MongoDB features:
+
+ MongoDB bridges the gap between key-value stores (which are fast and highly
+ scalable) and traditional RDBMS systems (which provide structured schemas
+ and powerful queries).
+ </longdescription>
+</pkgmetadata>
+
diff --git a/dev-db/mongodb/mongodb-1.2.2.ebuild b/dev-db/mongodb/mongodb-1.2.2.ebuild
new file mode 100644
index 000000000000..db64180230c6
--- /dev/null
+++ b/dev-db/mongodb/mongodb-1.2.2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/mongodb-1.2.2.ebuild,v 1.1 2010/03/07 23:39:41 ramereth Exp $
+
+EAPI="2"
+
+inherit eutils versionator
+
+MY_PATCHVER=$(get_version_component_range 1-2)
+
+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[unicode]
+ dev-libs/boost
+ dev-libs/libpcre"
+
+DEPEND="${RDEPEND}
+ >=dev-util/scons-1.2.0-r1"
+
+# Must change this on every upgrade
+S=${WORKDIR}/${PN}-mongo-8a4fb8b
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/"${PN}"-"${MY_PATCHVER}"-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"
+ dodoc README docs/building.md
+
+ 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"
+}
+
+pkg_preinst() {
+ has_version '<dev-db/mongodb-1.2'
+ PREVIOUS_LESS_THAN_1_2=$?
+}
+
+pkg_postinst() {
+ if [[ ${PREVIOUS_LESS_THAN_1_2} -eq 0 ]]; then
+ ewarn "You need to upgrade your database before proceeding! Steps:"
+ ewarn " /etc/init.d/mongodb stop"
+ ewarn " mongod --upgrade"
+ ewarn " /etc/init.d/mongodb start"
+ ewarn "For more info about upgrading, please visit:"
+ ewarn "http://www.mongodb.org/display/DOCS/1.2.0+Release+Notes"
+ fi;
+}