void-packages/srcpkgs/mongodb/template

65 lines
1.7 KiB
Text

# Template file for 'mongodb'
pkgname=mongodb
version=2.6.8
revision=2
hostmakedepends="scons"
makedepends="boost-devel pcre-devel snappy-devel libressl-devel>=2.1.4 libpcap-devel gperftools-devel v8-3.16-devel"
conf_files="/etc/mongodb/mongodb.conf"
system_accounts="mongodb"
mongodb_homedir="/var/lib/mongodb"
short_desc="High-performance, schema-free document-oriented database"
maintainer="Enno Boland <eb@s01.de>"
homepage="http://www.mongodb.org"
license="AGPL-3"
distfiles="http://downloads.mongodb.org/src/mongodb-src-r${version}.tar.gz"
checksum="1997f60d9de17320f22c604d8aa1cbe5f38d877142cd0e9130fe3dae7b311a06"
make_dirs="
/var/lib/mongodb 0700 mongodb mongodb
/var/log/mongodb 0750 mongodb mongodb"
wrksrc="mongodb-src-r${version}"
_scons_args=" --use-system-boost \
--use-system-pcre \
--use-system-snappy \
--use-system-tcmalloc \
--use-system-v8 \
--ssl \
--sharedclient \
--variant-dir=void \
--nostrip \
--disable-warnings-as-errors"
build_options="systemd"
# ETOOHUGE
nodebug=1
do_configure() {
find . -name SConstruct -print0 | xargs -0 sed -i "s/-Werror/-Wno-error/g"
}
do_build() {
scons all ${makejobs} \
--cc=$CC \
--cxx=$CXX \
--ld=$CXX \
--libpath="${XBPS_CROSS_BASE}/usr/lib" \
--cpppath="${XBPS_CROSS_BASE}/usr/include" \
--prefix="/usr" \
$_scons_args
}
do_install() {
scons install \
--cc=$CC \
--cxx=$CXX \
--ld=$CXX \
--libpath=${XBPS_CROSS_BASE}/usr/lib \
--cpppath=${XBPS_CROSS_BASE}/usr/include \
--prefix="${DESTDIR}/usr" \
$_scons_args
vinstall ${FILESDIR}/mongodb.conf 644 etc/mongodb
if [ "$build_option_systemd" ]; then
vinstall ${FILESDIR}/mongodb.service 644 usr/lib/systemd/system
fi
vsv mongodb
}