aboutsummaryrefslogtreecommitdiff
path: root/databases/mongodb/Makefile
blob: 836c615a44005a2b059fde2f0ef2aa3802543778 (plain) (blame)
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
# New ports collection makefile for:  mongodb
# Date created:        3 November 2009
# Whom:                Mirko Zinn <mail@derzinn.de>
#
# $FreeBSD$
#

PORTNAME=	mongodb
PORTVERSION=	2.0.2
CATEGORIES=	databases net
MASTER_SITES=	http://downloads.mongodb.org/src/
DISTNAME=	${PORTNAME}-src-r${PORTVERSION}

MAINTAINER=	mail@derzinn.de
COMMENT=	A NOSQL distributed document-oriented database

LIB_DEPENDS=	boost_system:${PORTSDIR}/devel/boost-libs \
		execinfo.1:${PORTSDIR}/devel/libexecinfo \
		nspr4:${PORTSDIR}/devel/nspr \
		pcre:${PORTSDIR}/devel/pcre \
		snappy:${PORTSDIR}/archivers/snappy

ONLY_FOR_ARCHS=	i386 amd64
ONLY_FOR_ARCHS_REASON=	"not yet ported to anything other than i386 and amd64"

OPTIONS=	DEVEL "Install development files (library and headers)" off \
		V8 "Use v8 instead of spider monkey for javascript" off

USE_SCONS=	yes
SCONS_TARGET=	all
SCONS_ARGS=	--prefix=${PREFIX} --cxx=${CXX} --cpp=${CPP} --use-system-all

USERS=	mongodb
GROUPS=	mongodb

USE_RC_SUBR=	mongod

.include <bsd.port.pre.mk>

.if defined(WITH_DEVEL)
SCONS_ARGS+=	--full
PLIST_SUB+=	DEVEL=""
.else
PLIST_SUB+=	DEVEL="@comment "
.endif

.if defined(WITH_V8)
SCONS_ARGS+=	--usev8
LIB_DEPENDS+=	v8:${PORTSDIR}/lang/v8
.else
SCONS_ARGS+=	--usesm
LIB_DEPENDS+=	js:${PORTSDIR}/lang/spidermonkey
.endif

post-install:
	@if [ ! -f ${PREFIX}/etc/mongodb.conf ]; then \
		${TOUCH} ${PREFIX}/etc/mongodb.conf ; \
	fi

.include <bsd.port.post.mk>