You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
129 lines
4.4 KiB
129 lines
4.4 KiB
## |
|
## mongodb.spec -- OpenPKG RPM Package Specification |
|
## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/> |
|
## |
|
## Permission to use, copy, modify, and distribute this software for |
|
## any purpose with or without fee is hereby granted, provided that |
|
## the above copyright notice and this permission notice appear in all |
|
## copies. |
|
## |
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
## SUCH DAMAGE. |
|
## |
|
|
|
# package information |
|
Name: mongodb |
|
Summary: Mongo Database |
|
URL: http://www.mongodb.org/ |
|
Vendor: 10gen, Inc. |
|
Packager: OpenPKG Foundation e.V. |
|
Distribution: OpenPKG Community |
|
Class: EVAL |
|
Group: Database |
|
License: GPL |
|
Version: 1.6.4 |
|
Release: 20101029 |
|
|
|
# list of sources |
|
Source0: http://downloads.mongodb.org/src/mongodb-src-r%{version}.tar.gz |
|
Source1: rc.mongodb |
|
Source2: mongodb.conf |
|
Patch0: mongodb.patch |
|
|
|
# build information |
|
BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, gcc::with_cxx = yes, scons |
|
PreReq: OpenPKG, openpkg >= 20100101 |
|
BuildPreReq: boost, pcre, js |
|
PreReq: boost, pcre, js |
|
|
|
%description |
|
MongoDB bridges the gap between key-value stores (which are fast and |
|
highly scalable) and traditional RDBMS systems (which provide rich |
|
queries and deep functionality). MongoDB (from "humongous") is a |
|
scalable, high-performance, open source, document-oriented database. |
|
Written in C++, MongoDB features: Document-oriented storage, Full |
|
Index Support, Replication & High Availability, Auto-Sharding, |
|
Querying, Fast In-Place Updates, Map/Reduce, GridFS, etc. |
|
|
|
%track |
|
prog mongodb = { |
|
version = %{version} |
|
url = http://www.mongodb.org/downloads |
|
regex = mongodb-src-r(\d+\.[02468]\.\d+)\.tar\.gz |
|
} |
|
|
|
%prep |
|
%setup -q -n mongodb-src-r%{version} |
|
%patch -p0 |
|
|
|
%build |
|
# build program |
|
%{l_shtool} subst %{l_value -s -a} \ |
|
SConstruct |
|
%{l_shtool} subst \ |
|
-e 's;/data/db;%{l_prefix}/var/mongo/db;g' \ |
|
buildscripts/cleanbb.py \ |
|
buildscripts/smoke.py \ |
|
db/db.cpp \ |
|
db/flushtest.cpp \ |
|
db/pdfile.cpp \ |
|
dbtests/perf/perftest.cpp \ |
|
shell/mongo_vstudio.cpp |
|
scons \ |
|
--prefix=%{l_prefix} \ |
|
--distname="OpenPKG" \ |
|
--cxx="%{l_cxx}" \ |
|
--release \ |
|
--static \ |
|
. |
|
|
|
%install |
|
# install program |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/bin |
|
for prg in \ |
|
bsondump mongobridge mongofiles \ |
|
mongo mongod mongodump mongoexport mongofiles \ |
|
mongoimport mongorestore mongos mongosniff mongostat; do |
|
%{l_shtool} install -c -s -m 755 \ |
|
$prg $RPM_BUILD_ROOT%{l_prefix}/bin/ |
|
done |
|
|
|
# install default configuration |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/etc/mongodb |
|
%{l_shtool} install -c -m 755 %{l_value -s -a} \ |
|
%{SOURCE mongodb.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/mongodb/ |
|
|
|
# install run-command script |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d |
|
%{l_shtool} install -c -m 755 %{l_value -s -a} \ |
|
%{SOURCE rc.mongodb} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
|
|
|
# create run-time directory |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/var/mongodb/db \ |
|
$RPM_BUILD_ROOT%{l_prefix}/var/mongodb/log \ |
|
$RPM_BUILD_ROOT%{l_prefix}/var/mongodb/run |
|
|
|
# determine installation files |
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
|
%{l_files_std} \ |
|
'%config %{l_prefix}/etc/mongodb/*' \ |
|
'%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/mongodb/*' |
|
|
|
%files -f files |
|
|
|
%clean |
|
|
|
|