0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/rpm/mongo.spec

151 lines
4.1 KiB
RPMSpec
Raw Normal View History

2009-12-03 20:20:35 +01:00
Name: mongo
2010-02-11 21:29:16 +01:00
Version: 1.3.2
2009-12-08 18:18:37 +01:00
Release: mongodb_1%{?dist}
2009-12-03 20:20:35 +01:00
Summary: mongo client shell and tools
License: AGPL 3.0
URL: http://www.mongodb.org
Group: Applications/Databases
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: js-devel, readline-devel, boost-devel, pcre-devel
BuildRequires: gcc-c++, scons
%description
Mongo (from "huMONGOus") is a schema-free document-oriented database.
It features dynamic profileable queries, full indexing, replication
and fail-over support, efficient storage of large binary data objects,
and auto-sharding.
This package provides the mongo shell, import/export tools, and other
client utilities.
%package server
Summary: mongo server, sharding server, and support scripts
Group: Applications/Databases
%description server
Mongo (from "huMONGOus") is a schema-free document-oriented database.
This package provides the mongo server software, mongo sharding server
softwware, default configuration files, and init.d scripts.
%package devel
Summary: Headers and libraries for mongo development.
Group: Applications/Databases
%description devel
Mongo (from "huMONGOus") is a schema-free document-oriented database.
This package provides the mongo static library and header files needed
to develop mongo client software.
%prep
%setup
%build
scons --prefix=$RPM_BUILD_ROOT/usr all
# XXX really should have shared library here
%build mostlystatic
scons --prefix=$RPM_BUILD_ROOT/usr --extralib=nspr4 --staticlib=boost_system-mt,boost_thread-mt,boost_filesystem-mt,boost_program_options-mt,js install
2009-12-03 20:20:35 +01:00
%install
scons --prefix=$RPM_BUILD_ROOT/usr install
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
cp debian/*.1 $RPM_BUILD_ROOT/usr/share/man/man1/
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
cp rpm/init.d-mongod $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
chmod a+x $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
mkdir -p $RPM_BUILD_ROOT/etc
cp rpm/mongod.conf $RPM_BUILD_ROOT/etc/mongod.conf
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
2010-01-26 16:39:25 +01:00
cp rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
2009-12-03 20:20:35 +01:00
mkdir -p $RPM_BUILD_ROOT/var/lib/mongo
mkdir -p $RPM_BUILD_ROOT/var/log
touch $RPM_BUILD_ROOT/var/log/mongo
%install mostlystatic
scons --prefix=$RPM_BUILD_ROOT/usr install
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
cp debian/*.1 $RPM_BUILD_ROOT/usr/share/man/man1/
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
cp rpm/init.d-mongod $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
chmod a+x $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
mkdir -p $RPM_BUILD_ROOT/etc
cp rpm/mongod.conf $RPM_BUILD_ROOT/etc/mongod.conf
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
cp rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
mkdir -p $RPM_BUILD_ROOT/var/lib/mongo
mkdir -p $RPM_BUILD_ROOT/var/log
touch $RPM_BUILD_ROOT/var/log/mongo
2009-12-03 20:20:35 +01:00
%clean
scons -c
rm -rf $RPM_BUILD_ROOT
%pre server
#/usr/sbin/useradd -M -o -r -d /var/lib/mongo -s /bin/bash \
2009-12-03 20:20:35 +01:00
# -c "mongod" mongod > /dev/null 2>&1 || :
%post server
if test $1 = 1
then
/sbin/chkconfig --add mongod
fi
%preun server
if test $1 = 0
then
/sbin/chkconfig --del mongod
fi
%postun server
if test $1 -ge 1
then
/sbin/service mongod stop >/dev/null 2>&1 || :
fi
%files
%defattr(-,root,root,-)
%doc README GNU-AGPL-3.0.txt
%{_bindir}/mongo
%{_bindir}/mongodump
%{_bindir}/mongoexport
%{_bindir}/mongofiles
%{_bindir}/mongoimport
%{_bindir}/mongorestore
%{_mandir}/man1/mongo.1*
%{_mandir}/man1/mongodump.1*
%{_mandir}/man1/mongoexport.1*
%{_mandir}/man1/mongofiles.1*
%{_mandir}/man1/mongoimport.1*
%{_mandir}/man1/mongorestore.1*
%files server
%defattr(-,root,root,-)
%config(noreplace) /etc/mongod.conf
%{_bindir}/mongod
%{_bindir}/mongos
#%{_mandir}/man1/mongod.1*
%{_mandir}/man1/mongos.1*
/etc/rc.d/init.d/mongod
/etc/sysconfig/mongod
2009-12-03 20:20:35 +01:00
#/etc/rc.d/init.d/mongos
2010-01-26 16:39:25 +01:00
%attr(0755,root,root) %dir /var/lib/mongo
2009-12-03 20:20:35 +01:00
%attr(0640,root,root) %config(noreplace) %verify(not md5 size mtime) /var/log/mongo
%files devel
/usr/include/mongo
%{_libdir}/libmongoclient.a
#%{_libdir}/libmongotestfiles.a
%changelog
* Sat Oct 24 2009 Joe Miklojcik <jmiklojcik@shopwiki.com> -
- Wrote mongo.spec.
* Thu Jan 28 2010 Richard M Kreuter <richard@10gen.com>
- Minor fixes.