blob: ff67323e474ec6e3a830ac9a498f7086b1db214b (
plain)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
# $NetBSD: Makefile,v 1.23 2017/08/24 20:03:08 adam Exp $
DISTNAME= mongodb-src-r3.4.4
PKGNAME= ${DISTNAME:S/src-r//:S/-rc/rc/}
PKGREVISION= 1
CATEGORIES= databases
MASTER_SITES= http://fastdl.mongodb.org/src/
MAINTAINER= bartosz.kuzma@gmail.com
HOMEPAGE= http://mongodb.org/
COMMENT= NoSQL distributed document-oriented database
LICENSE= gnu-agpl-v3 # Client and tools licensed under apache-2.0
EXTRACT_USING= bsdtar
NO_CONFIGURE= yes
USE_LANGUAGES= c c++
BUILD_DEPENDS+= scons-[0-9]*:../../devel/scons
SCONS_BIN= ${PREFIX}/bin/scons
SCONS_ARGS= ${_MAKE_JOBS}
SCONS_ARGS+= --use-system-boost
SCONS_ARGS+= --use-system-pcre
SCONS_ARGS+= --use-system-snappy
SCONS_ARGS+= --use-system-tcmalloc
SCONS_ARGS+= --use-system-yaml
SCONS_ARGS+= --use-system-zlib
SCONS_ARGS+= --js-engine=mozjs
SCONS_ARGS+= --release
PYTHON_VERSIONS_INCOMPATIBLE= 34 35 36 # not yet supported as of 3.0.4
.include "../../mk/bsd.prefs.mk"
GCC_REQD+= 5.3.0
CPPFLAGS+= -fno-jump-tables
.include "options.mk"
SMF_METHODS+= mongodb
BUILD_DEFS+= VARBASE
BUILD_DEFS+= MONGODB_USER MONGODB_GROUP MONGODB_DBPATH
BUILD_DEFS+= MONGODB_LOGPATH
MONGODB_USER?= mongodb
MONGODB_GROUP?= mongodb
MONGODB_DBPATH?= ${VARBASE}/mongodb
MONGODB_LOGPATH?= ${VARBASE}/log/mongodb
PKG_USERS_VARS+= MONGODB_USER
PKG_GROUPS_VARS+= MONGODB_GROUP
PKG_GROUPS= ${MONGODB_GROUP}
PKG_USERS= ${MONGODB_USER}:${MONGODB_GROUP}
PKG_GECOS.${MONGODB_USER}= MongoDB database administrator
PKG_HOME.${MONGODB_USER}= ${MONGODB_DBPATH}
PKG_SHELL.${MONGODB_USER}= ${SH}
OWN_DIRS_PERMS+= ${MONGODB_DBPATH} ${MONGODB_USER} ${MONGODB_GROUP} 0755
OWN_DIRS_PERMS+= ${MONGODB_DBPATH}/journal ${MONGODB_USER} ${MONGODB_GROUP} 0755
OWN_DIRS_PERMS+= ${MONGODB_LOGPATH} ${MONGODB_USER} ${MONGODB_GROUP} 0755
FILES_SUBST+= MONGODB_USER=${MONGODB_USER}
FILES_SUBST+= MONGODB_GROUP=${MONGODB_GROUP}
FILES_SUBST+= MONGODB_DBPATH=${MONGODB_DBPATH}
FILES_SUBST+= MONGODB_LOGPATH=${MONGODB_LOGPATH}
# XXX No better idea how to pass CXXFLAGS and LDFLAGS to scons
SUBST_CLASSES+= scons
SUBST_STAGE.scons= pre-build
SUBST_FILES.scons= SConstruct
SUBST_VARS.scons= PREFIX CXXFLAGS LDFLAGS
SUBST_CLASSES+= path
SUBST_STAGE.path= pre-build
SUBST_FILES.path= src/mongo/db/flushtest.cpp debian/mongod.conf
SUBST_FILES.path+= debian/mongod.1 debian/mongo.1 src/mongo/shell/dbshell.cpp
SUBST_SED.path= -e 's|/data/db|${MONGODB_DBPATH}|g'
SUBST_SED.path+= -e 's|/etc|${PKG_SYSCONFDIR}|'
SUBST_VARS.path= MONGODB_DBPATH MONGODB_LOGPATH
LDFLAGS+= ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.boost-libs}/lib
MONGODB_MAN_FILES= bsondump.1 mongo.1 mongod.1 mongodump.1 mongoexport.1 \
mongofiles.1 mongoimport.1 mongooplog.1 mongoperf.1 \
mongorestore.1 mongos.1 mongosniff.1 mongostat.1 mongotop.1
NOT_PAX_MPROTECT_SAFE+= bin/mongo
RCD_SCRIPTS= mongodb
INSTALLATION_DIRS+= share/doc/mongodb share/examples/mongodb ${PKGMANDIR}/man1
CONF_FILES+= share/examples/mongodb/mongod.conf \
${PKG_SYSCONFDIR}/mongod.conf
post-extract:
chmod -R g-w ${WRKSRC}
cp -r ${WRKSRC}/src/third_party/mozjs-45/platform/x86_64/freebsd \
${WRKSRC}/src/third_party/mozjs-45/platform/x86_64/dragonfly
cp -r ${WRKSRC}/src/third_party/mozjs-45/platform/x86_64/openbsd \
${WRKSRC}/src/third_party/mozjs-45/platform/x86_64/netbsd
cp ${WRKSRC}/src/mongo/db/ftdc/ftdc_system_stats_openbsd.cpp \
${WRKSRC}/src/mongo/db/ftdc/ftdc_system_stats_netbsd.cpp
do-build:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONS_BIN} ${SCONS_ARGS} core
do-install:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONS_BIN} ${SCONS_ARGS} \
--prefix=${DESTDIR}${PREFIX} install
do-test:
cd ${WRKSRC} && ./test
post-install:
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/mongodb
.for file in ${MONGODB_MAN_FILES}
${INSTALL_MAN} ${WRKSRC}/debian/${file} \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
.endfor
${INSTALL_DATA} ${WRKSRC}/debian/mongod.conf \
${DESTDIR}${PREFIX}/share/examples/mongodb
.include "../../devel/boost-headers/buildlink3.mk"
.include "../../devel/boost-libs/buildlink3.mk"
.include "../../devel/py-boost/buildlink3.mk"
.include "../../devel/libexecinfo/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
.include "../../devel/snappy/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../net/libpcap/buildlink3.mk"
.include "../../textproc/yaml-cpp/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
|