Mongo (from "humongous") is a high-performance, open source,
schema-free, document-oriented database. A common name in the "NOSQL" community. WWW: http://www.mongodb.org/ PR: ports/140144 [1] ports/140257 [2] ports/140489 [1] Submitted by: Mirko Zinn <mail@derzinn.de> [1] Ivan Voras <ivoras@FreeBSD.org> [2]
This commit is contained in:
parent
7676829042
commit
af4df674ff
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=244459
8 changed files with 174 additions and 0 deletions
|
@ -171,6 +171,7 @@
|
|||
SUBDIR += memcachedb
|
||||
SUBDIR += metakit
|
||||
SUBDIR += mird
|
||||
SUBDIR += mongodb
|
||||
SUBDIR += mrtg-mysql-load
|
||||
SUBDIR += msql
|
||||
SUBDIR += msql3
|
||||
|
|
56
databases/mongodb/Makefile
Normal file
56
databases/mongodb/Makefile
Normal file
|
@ -0,0 +1,56 @@
|
|||
# New ports collection makefile for: mongodb
|
||||
# Date created: 3 November 2009
|
||||
# Whom: Mirko Zinn <mail@derzinn.de>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= mongodb
|
||||
PORTVERSION= 1.0.1
|
||||
CATEGORIES= databases net
|
||||
MASTER_SITES= http://download.github.com/ \
|
||||
http://derzinn.de/files/
|
||||
DISTNAME= mongodb-mongo-e316c78
|
||||
|
||||
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]*
|
||||
|
||||
USE_SCONS= yes
|
||||
SCONS_TARGET= all
|
||||
|
||||
USE_RC_SUBR= mongod
|
||||
MONGO_FILES= mongo mongod mongodump mongoexport mongofiles \
|
||||
mongoimportjson 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>
|
3
databases/mongodb/distinfo
Normal file
3
databases/mongodb/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
MD5 (mongodb-mongo-e316c78.tar.gz) = 93cf5cf75ee020c31e1b3a8627f80d83
|
||||
SHA256 (mongodb-mongo-e316c78.tar.gz) = 509f34c847e6d63f898e0337717fa78f2389e82ed6a6bb5f47df70bd2cfb1af2
|
||||
SIZE (mongodb-mongo-e316c78.tar.gz) = 3922059
|
39
databases/mongodb/files/mongod.in
Normal file
39
databases/mongodb/files/mongod.in
Normal file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: mongod
|
||||
# REQUIRE: NETWORK
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
||||
# to enable this service:
|
||||
#
|
||||
# mongod_enable (bool): Set to NO by default.
|
||||
# Set it to YES to enable mongod.
|
||||
#
|
||||
# Additional configurable variables:
|
||||
# mongod_config (path): Set to %%PREFIX%%/etc/mongod.conf
|
||||
# by default. Additional configuration. You
|
||||
# can also use mongod_flags for additional
|
||||
# command line arguments.
|
||||
# mongod_dbpath (path): Set to /var/db/mongod by default
|
||||
# mongod_user (username): Set to "mongod" by default
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
name="mongod"
|
||||
rcvar=${name}_enable
|
||||
|
||||
command=%%PREFIX%%/bin/${name}
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${mongod_enable="NO"}
|
||||
: ${mongod_config="%%PREFIX%%/etc/mongodb.conf"}
|
||||
: ${mongod_dbpath="/var/db/mongodb"}
|
||||
: ${mongod_user="mongodb"}
|
||||
|
||||
command_args="-f $mongod_config --dbpath $mongod_dbpath --logappend --logpath $mongod_dbpath/mongod.log --fork"
|
||||
|
||||
required_dirs=${mongod_dbpath}
|
||||
|
||||
run_rc_command "$1"
|
||||
|
15
databases/mongodb/pkg-deinstall
Normal file
15
databases/mongodb/pkg-deinstall
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
if [ "$2" != "POST-DEINSTALL" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
USER=mongodb
|
||||
|
||||
if pw usershow "${USER}" 2>/dev/null 1>&2; then
|
||||
echo "To delete mongodb user permanently, use 'pw userdel ${USER}'"
|
||||
fi
|
||||
|
||||
exit 0
|
5
databases/mongodb/pkg-descr
Normal file
5
databases/mongodb/pkg-descr
Normal file
|
@ -0,0 +1,5 @@
|
|||
Mongo (from "humongous") is a high-performance, open source,
|
||||
schema-free, document-oriented database. A common name in the
|
||||
"NOSQL" community.
|
||||
|
||||
WWW: http://www.mongodb.org/
|
43
databases/mongodb/pkg-install
Normal file
43
databases/mongodb/pkg-install
Normal file
|
@ -0,0 +1,43 @@
|
|||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
if [ "$2" != "PRE-INSTALL" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
USER=mongodb
|
||||
GROUP=${USER}
|
||||
UID=922
|
||||
GID=${UID}
|
||||
DBDIR=/var/db/mongodb
|
||||
|
||||
#touch ${PREFIX}/etc/mongodb.conf
|
||||
|
||||
if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
|
||||
if pw groupadd ${GROUP} -g ${GID}; then
|
||||
echo "Added group \"${GROUP}\"."
|
||||
else
|
||||
echo "Adding group \"${GROUP}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
|
||||
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
|
||||
-s "/bin/sh" -d "/var/db/mongodb" \
|
||||
-c "mongodb pseudo-user"; \
|
||||
then
|
||||
echo "Added user \"${USER}\"."
|
||||
if [ ! -d ${DBDIR} ]
|
||||
then
|
||||
echo "Creating \"${DBDIR}\"."
|
||||
mkdir ${DBDIR}
|
||||
chown ${USER}:${GROUP} ${DBDIR}
|
||||
fi
|
||||
else
|
||||
echo "Adding user \"${USER}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
exit 0
|
12
databases/mongodb/pkg-plist
Normal file
12
databases/mongodb/pkg-plist
Normal file
|
@ -0,0 +1,12 @@
|
|||
@unexec if [ ! -s %D/etc/mongodb.conf ]; then /bin/rm -f %D/etc/mongodb.conf; fi
|
||||
bin/mongo
|
||||
bin/mongod
|
||||
bin/mongodump
|
||||
bin/mongoexport
|
||||
bin/mongofiles
|
||||
bin/mongoimportjson
|
||||
bin/mongorestore
|
||||
bin/mongos
|
||||
bin/mongosniff
|
||||
lib/libmongoclient.a
|
||||
@exec if [ ! -f %D/etc/mongodb.conf ]; then /usr/bin/touch %D/etc/mongodb.conf; fi
|
Loading…
Reference in a new issue