|
|
|
|
@ -34,6 +34,9 @@ License: AGPL
|
|
|
|
|
Version: 2.0.6 |
|
|
|
|
Release: 20120608 |
|
|
|
|
|
|
|
|
|
# package options |
|
|
|
|
%option with_ssl no |
|
|
|
|
|
|
|
|
|
# list of sources |
|
|
|
|
Source0: http://downloads.mongodb.org/src/mongodb-src-r%{version}.tar.gz |
|
|
|
|
Source1: rc.mongodb |
|
|
|
|
@ -43,8 +46,12 @@ Patch0: mongodb.patch
|
|
|
|
|
# build information |
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, gcc::with_cxx = yes, scons |
|
|
|
|
PreReq: OpenPKG, openpkg >= 20100101 |
|
|
|
|
BuildPreReq: boost, libexecinfo, v8, openssl, pcre, pcre::with_cxx = yes, snappy |
|
|
|
|
PreReq: boost, libexecinfo, v8, openssl, pcre, pcre::with_cxx = yes, snappy |
|
|
|
|
BuildPreReq: boost, libexecinfo, v8, pcre, pcre::with_cxx = yes, snappy |
|
|
|
|
PreReq: boost, libexecinfo, v8, pcre, pcre::with_cxx = yes, snappy |
|
|
|
|
%if "%{with_ssl}" == "yes" |
|
|
|
|
BuildPreReq: openssl, x509 |
|
|
|
|
PreReq: openssl, x509 |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
%description |
|
|
|
|
MongoDB bridges the gap between key-value stores (which are fast and |
|
|
|
|
@ -91,7 +98,9 @@ PreReq: boost, libexecinfo, v8, openssl, pcre, pcre::with_cxx = yes, snapp
|
|
|
|
|
--use-system-pcre \ |
|
|
|
|
--use-system-snappy \ |
|
|
|
|
--usev8 \ |
|
|
|
|
%if "%{with_ssl}" == "yes" |
|
|
|
|
--ssl \ |
|
|
|
|
%endif |
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
%install |
|
|
|
|
@ -147,6 +156,15 @@ PreReq: boost, libexecinfo, v8, openssl, pcre, pcre::with_cxx = yes, snapp
|
|
|
|
|
chmod 700 $RPM_INSTALL_PREFIX/etc/mongodb/mongodb.key |
|
|
|
|
chown %{l_rusr}:%{l_rgrp} $RPM_INSTALL_PREFIX/etc/mongodb/mongodb.key |
|
|
|
|
|
|
|
|
|
# optionally create bundled SSL certificate/key file |
|
|
|
|
%if "%{with_ssl}" == "yes" |
|
|
|
|
cat $RPM_INSTALL_PREFIX/etc/x509/example-server.crt.pem \ |
|
|
|
|
$RPM_INSTALL_PREFIX/etc/x509/example-server.key.pem \ |
|
|
|
|
>$RPM_INSTALL_PREFIX/etc/mongodb/mongodb.pem |
|
|
|
|
chmod 700 $RPM_INSTALL_PREFIX/etc/mongodb/mongodb.pem |
|
|
|
|
chown %{l_rusr}:%{l_rgrp} $RPM_INSTALL_PREFIX/etc/mongodb/mongodb.pem |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# display information about next steps |
|
|
|
|
( echo "After initially starting MongoDB with..." |
|
|
|
|
echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc mongodb start" |
|
|
|
|
@ -174,6 +192,9 @@ PreReq: boost, libexecinfo, v8, openssl, pcre, pcre::with_cxx = yes, snapp
|
|
|
|
|
rm -f $RPM_INSTALL_PREFIX/var/mongodb/log/* >/dev/null 2>&1 || true |
|
|
|
|
rm -rf $RPM_INSTALL_PREFIX/var/mongodb/db/* >/dev/null 2>&1 || true |
|
|
|
|
rm -f $RPM_INSTALL_PREFIX/etc/mongodb/mongodb.key >/dev/null 2>&1 || true |
|
|
|
|
%if "%{with_ssl}" == "yes" |
|
|
|
|
rm -f $RPM_INSTALL_PREFIX/etc/mongodb/mongodb.pem >/dev/null 2>&1 || true |
|
|
|
|
%endif |
|
|
|
|
fi |
|
|
|
|
exit 0 |
|
|
|
|
|
|
|
|
|
|