View | Details | Raw Unified | Return to bug 205510
Collapse All | Expand All

(-)Makefile (+65 lines)
Line 0 Link Here
1
# Created by: Brendan Molloy <brendan+freebsd@bbqsrc.net>
2
# $FreeBSD$
3
4
PORTNAME=	mongodb32
5
PORTVERSION=	3.2.0
6
DISTVERSIONPREFIX=	r
7
CATEGORIES=	databases net
8
MASTER_SITES=	https://fastdl.mongodb.org/src/ \
9
		http://fastdl.mongodb.org/src/ \
10
		http://download.mongodb.org/src/
11
DISTNAME=	mongodb-src-${DISTVERSIONPREFIX}${PORTVERSION}
12
13
MAINTAINER=	brendan+freebsd@bbqsrc.net
14
COMMENT=	NOSQL distributed document-oriented database
15
16
# mongodb is AGPLv3, C++ driver is APACHE20
17
LICENSE=	AGPLv3 APACHE20
18
LICENSE_COMB=	multi
19
20
LIB_DEPENDS=	libpcre.so:${PORTSDIR}/devel/pcre \
21
		libsnappy.so:${PORTSDIR}/archivers/snappy
22
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}yaml>=3.11:${PORTSDIR}/devel/py-yaml \
23
		${PYTHON_PKGNAMEPREFIX}pymongo>=3.0:${PORTSDIR}/databases/pymongo
24
25
ONLY_FOR_ARCHS=	i386 amd64
26
ONLY_FOR_ARCHS_REASON=	"not yet ported to anything other than i386 and amd64"
27
28
OPTIONS_DEFINE=	SASL SSL
29
OPTIONS_DEFAULT=SSL
30
31
SASL_LIB_DEPENDS=	libsasl2.so:${PORTSDIR}/security/cyrus-sasl2
32
SASL_MAKE_ARGS=	--use-sasl-client
33
34
SSL_USE=	openssl=yes
35
SSL_MAKE_ARGS=	--ssl
36
37
USES=		cpe execinfo python:build scons
38
MAKE_ARGS=	--prefix=${STAGEDIR}${PREFIX} \
39
		--use-system-pcre --use-system-snappy \
40
		--release
41
42
USERS=	mongodb
43
GROUPS=	mongodb
44
45
USE_RC_SUBR=	mongod
46
47
ALL_TARGET=	core
48
TEST_TARGET=	unittests
49
50
post-install:
51
.for f in mongo mongod mongoperf mongos mongosniff
52
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${f}
53
.endfor
54
55
do-test:
56
	@cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} \
57
		${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} ${TEST_TARGET} &&\
58
		${PYTHON_CMD} ${BUILD_WRKSRC}/buildscripts/resmoke.py\
59
		--suites=unittests --jobs=${MAKE_JOBS_NUMBER}
60
61
PORTSCOUT=	limitw:1,even
62
63
CPE_PRODUCT=	mongodb
64
65
.include <bsd.port.mk>
(-)distinfo (+2 lines)
Line 0 Link Here
1
SHA256 (mongodb-src-r3.2.0.tar.gz) = c6dd1d1670b86cbf02a531ddf7a7cda8f138d8733acce33766f174bd1e5ab2ee
2
SIZE (mongodb-src-r3.2.0.tar.gz) = 26440220
(-)files/mongod.in (+59 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# PROVIDE: mongod
4
# REQUIRE: NETWORK ldconfig
5
# KEYWORD: shutdown
6
#
7
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
8
# to enable this service:
9
#
10
# mongod_enable (bool):  Set to "NO" by default.                                                                                                                                                                                             
11
#                        Set it to "YES" to enable mongod.
12
# mongod_limits (bool):  Set to "NO" by default.
13
#                        Set it to yes to run `limits -e -U mongodb`
14
#                        just before mongod starts.
15
# mongod_dbpath (str):   Default to "/var/db/mongodb"
16
#                        Base database directory.
17
# mongod_flags (str):    Custom additional arguments to be passed to mongod.
18
#                        Default to "--logpath ${mongod_dbpath}/mongod.log --logappend".
19
#
20
21
. /etc/rc.subr
22
23
name="mongod"
24
rcvar=mongod_enable
25
26
load_rc_config $name
27
28
: ${mongod_enable="NO"}
29
: ${mongod_limits="NO"}
30
: ${mongod_dbpath="/var/db/mongodb"}
31
: ${mongod_flags="--logpath ${mongod_dbpath}/mongod.log --logappend"}
32
: ${mongod_user="mongodb"}
33
: ${mongod_group="mongodb"}
34
35
pidfile="${mongod_dbpath}/mongod.lock"
36
command=%%PREFIX%%/bin/${name}
37
command_args="--config %%PREFIX%%/etc/mongodb.conf --dbpath $mongod_dbpath --fork >/dev/null 2>/dev/null"
38
start_precmd="${name}_prestart"
39
40
mongod_create_dbpath()
41
{
42
        mkdir ${mongod_dbpath} >/dev/null 2>/dev/null
43
        [ $? -eq 0 ] && chown -R ${mongod_user}:${mongod_group} ${mongod_dbpath}
44
}
45
46
47
mongod_prestart()
48
{
49
        if [ ! -d ${mongod_dbpath} ]; then
50
                mongod_create_dbpath || return 1
51
        fi
52
        if checkyesno mongod_limits; then
53
                eval `/usr/bin/limits -e -U ${mongod_user}` 2>/dev/null
54
        else
55
                return 0
56
        fi
57
}
58
59
run_rc_command "$1"
(-)files/patch-SConstruct (+15 lines)
Line 0 Link Here
1
--- SConstruct.orig	2015-12-02 19:01:34 UTC
2
+++ SConstruct
3
@@ -840,9 +840,9 @@ if has_option('variables-help'):
4
     print env_vars.GenerateHelpText(env)
5
     Exit(0)
6
 
7
-unknown_vars = env_vars.UnknownVariables()
8
-if unknown_vars:
9
-    env.FatalError("Unknown variables specified: {0}", ", ".join(unknown_vars.keys()))
10
+#unknown_vars = env_vars.UnknownVariables()
11
+#if unknown_vars:
12
+#    env.FatalError("Unknown variables specified: {0}", ", ".join(unknown_vars.keys()))
13
 
14
 def set_config_header_define(env, varname, varval = 1):
15
     env['CONFIG_HEADER_DEFINES'][varname] = varval
(-)pkg-descr (+5 lines)
Line 0 Link Here
1
Mongo (from "humongous") is a high-performance, open source,
2
schema-free, document-oriented database. A common name in the
3
"NOSQL" community.
4
5
WWW: http://www.mongodb.org/
(-)pkg-plist (+7 lines)
Line 0 Link Here
1
@unexec if [ ! -s %D/etc/mongodb.conf ]; then /bin/rm -f %D/etc/mongodb.conf; fi
2
@exec  if [ ! -f %D/etc/mongodb.conf ]; then /usr/bin/touch %D/etc/mongodb.conf; fi
3
bin/mongo
4
bin/mongod
5
bin/mongoperf
6
bin/mongos
7
bin/mongosniff

Return to bug 205510