# Copyright 2014 Marc-Antoine Perennou # Copyright 2012 Michael Thomas # Distributed under the terms of the GNU General Public License v2 # Based in part upon 'mongodb-1.6.5.exheres-0', which is: # Copyright 2010 Jonathan Dahan require scons systemd-service [ systemd_files=[ debian/mongod.service ] ] \ python [ blacklist=2 multibuild=false ] SUMMARY="A scalable, high-performance, schema-free, document-oriented database" DESCRIPTION=" Written in C++, MongoDB bridges the gap between key-value stores (which are fast and highly scalable) and traditional RDBMS systems (which provide structured schemas and powerful queries). " HOMEPAGE="https://www.mongodb.org" DOWNLOADS="https://downloads.mongodb.org/src/${PN}-src-r${PV}.tar.gz" LICENCES="Apache-2.0 SSPL-1.0" SLOT="0" PLATFORMS="~amd64" MYOPTIONS=" sasl [[ description = [ Support SASL authentication in the client library ] ]] ( providers: libressl openssl ) [[ number-selected = exactly-one ]] " RESTRICT="test" DEPENDENCIES=" build: dev-python/Cheetah3[python_abis:*(-)?] dev-python/psutil[python_abis:*(-)?] dev-python/PyYAML[python_abis:*(-)?] sys-devel/scons[>=3.1.1][python_abis:*(-)?] build+run: group/mongodb user/mongodb app-arch/snappy app-arch/zstd dev-libs/boost[>=1.49] dev-libs/pcre dev-libs/yaml-cpp:= net-misc/curl sys-libs/zlib providers:libressl? ( dev-libs/libressl:= ) providers:openssl? ( dev-libs/openssl:= ) sasl? ( net-libs/cyrus-sasl ) " DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/${PN}-4.4.5-no-compass.patch "${FILES}"/${PN}-4.4.1-boost.patch ) WORK="${WORKBASE}/${PN}-src-r${PV}" MONGO_PARAMS=( CC="${CC}" CXX="${CXX}" --release --nostrip --ssl --disable-warnings-as-errors --use-system-boost --use-system-pcre --use-system-snappy --use-system-yaml --use-system-zlib --use-system-zstd ) SCONS_SRC_CONFIGURE_PARAMS=( "${MONGO_PARAMS[@]}" ) SCONS_SRC_CONFIGURE_OPTIONS=( "sasl --use-sasl-client" ) SCONS_SRC_COMPILE_PARAMS=( "${MONGO_PARAMS[@]}" ) SCONS_SRC_INSTALL_PARAMS=( "${MONGO_PARAMS[@]}" ) src_prepare() { default # remove bundled third party libraries edo rm -rf src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} # remove compass which we do not build/install edo rm -rf src/mongo/installer/compass edo sed \ -e '/"-ggdb",/d' \ -i SConstruct edo sed \ -e 's:/var/run:/run:g' \ -e "s@/usr/bin@/usr/$(exhost --target)/bin@" \ -i debian/mongod.service edo sed \ -e '/timeZoneInfo:/a \ \ pidFilePath: \/run\/mongodb\/mongod.pid' \ -i debian/mongod.conf } src_compile() { PREFIX="${IMAGE}"/usr/$(exhost --target) escons \ --jobs ${EXJOBS:-1} \ CFLAGS="${CFLAGS}" \ CXXFLAGS="${CXXFLAGS}" \ "${SCONS_SRC_COMPILE_PARAMS[@]}" \ install-core } src_install() { dobin build/install/bin/{mongo,mongod,mongos} insinto /etc doins debian/mongod.conf emagicdocs install_systemd_files insinto ${SYSTEMDTMPFILESDIR} hereins ${PN}.conf <