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

PORTNAME=	mongodb
PORTVERSION=	1.2.2
CATEGORIES=	databases net
MASTER_SITES=	http://downloads.mongodb.org/src/ \
		http://derzinn.de/files/
DISTNAME=	mongodb-src-r${PORTVERSION}

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

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

CONFLICTS=	mongodb-devel-[0-9]*

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

USE_SCONS=	yes
SCONS_TARGET=	all

USE_RC_SUBR=	mongod
MONGO_FILES=	mongo mongod mongodump mongoexport mongofiles \
		mongoimport mongorestore mongos mongosniff

.include <bsd.port.pre.mk>
.if ${OSVERSION} < 700042
BROKEN=		Does not build
.endif

post-patch:
	@${REINPLACE_CMD} -E -e 's|elif "freebsd7" == os.sys.platform|elif os.sys.platform.startswith("freebsd")|' \
		${WRKSRC}/SConstruct
	@${REINPLACE_CMD} -e 's#/usr/local#${PREFIX}#g' ${WRKSRC}/SConstruct

do-install:
.for i in ${MONGO_FILES}
	${INSTALL_PROGRAM} ${WRKSRC}/${i} ${PREFIX}/bin
.endfor
	${INSTALL_DATA} ${WRKSRC}/libmongoclient.a ${PREFIX}/lib

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

	PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL

.include <bsd.port.post.mk>