void-packages/srcpkgs/mongodb/template
2019-01-07 19:43:52 +01:00

80 lines
2.3 KiB
Bash

# Template file for 'mongodb'
pkgname=mongodb
version=3.4.17
revision=3
wrksrc="mongodb-src-r${version}"
only_for_archs="aarch64 x86_64 aarch64-musl x86_64-musl ppc64le ppc64le-musl ppc64-musl"
conf_files="/etc/mongodb/mongodb.conf"
hostmakedepends="scons"
makedepends="pcre-devel snappy-devel libressl-devel libpcap-devel
gperftools libsasl-devel yaml-cpp-devel"
depends="cyrus-sasl-modules"
short_desc="High-performance, schema-free document-oriented database"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="AGPL-3.0-only"
homepage="http://www.mongodb.org"
distfiles="https://fastdl.mongodb.org/src/mongodb-src-r${version}.tar.gz"
checksum=6044e4c811a87bffd512a96fd2a4e4af9513af12f407bf7cd7c6281ccfb46484
system_accounts="mongodb"
mongodb_homedir="/var/lib/mongodb"
make_dirs="
/var/lib/mongodb 0700 mongodb mongodb
/var/log/mongodb 0750 mongodb mongodb"
# ETOOHUGE
nodebug=1
case "${XBPS_TARGET_MACHINE}" in
aarch64-musl)
# error: conflicting types for 'wchar_t'
broken="https://build.voidlinux.eu/builders/aarch64-musl_builder/builds/2739/steps/shell_3/logs/stdio"
;;
x86_64*|aarch64*|ppc64*) makedepends+=" wiredtiger-devel";;
esac
do_configure() {
find . -name SConstruct -print0 | xargs -0 sed -i "s/-Werror/-Wno-error/g"
case "$XBPS_TARGET_MACHINE" in
*-musl) # Disable strtouq(3)
sed -i src/third_party/wiredtiger/build_linux/wiredtiger_config.h \
-e "s;#define HAVE_STRTOUQ 1;#undef HAVE_STRTOUQ;"
esac
}
do_build() {
# Choose storage engine
case "$XBPS_TARGET_MACHINE" in
x86_64*|aarch64*|ppc64*) _scons_args="--wiredtiger=on --use-system-wiredtiger";;
i686*|arm*) _scons_args="--wiredtiger=off --mmapv1=on";;
*) _scons_args="--wiredtiger=off";;
esac
scons core tools ${makejobs} \
CC=$CC \
CFLAGS="$CFLAGS" \
CXX=$CXX \
CXXFLAGS="$CXXFLAGS" \
LIBPATH="${XBPS_CROSS_BASE}/usr/lib" \
CPPPATH="${XBPS_CROSS_BASE}/usr/include" \
--prefix="/usr" \
--use-system-pcre \
--use-system-snappy \
--use-system-zlib \
--use-system-yaml \
--use-sasl-client \
--ssl \
--nostrip \
--disable-warnings-as-errors \
--allocator=system \
${_scons_args}
# --use-system-intel_decimal128 \
}
do_install() {
for b in mongos mongod mongo mongoperf; do
vbin $b
done
vinstall ${FILESDIR}/mongodb.conf 644 etc/mongodb
vsv mongodb
vlicense GNU-AGPL-3.0.txt
}