3 # - pass our rpm*cflags
5 Summary: MongoDB client shell and tools
10 Group: Applications/Databases
11 URL: http://www.mongodb.org/
12 Source0: http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
13 # Source0-md5: 662e7ad6ff9f8e4d16c72c038b4a0c60
14 Source1: %{name}.logrotate
17 # BuildRequires: libpcap-devel
18 BuildRequires: boost-devel >= 1.42
19 BuildRequires: libstdc++-devel >= 6:4.0
20 BuildRequires: pcre-cxx-devel
21 BuildRequires: pcre-devel
22 BuildRequires: readline-devel
23 BuildRequires: rpmbuild(macros) >= 1.228
24 BuildRequires: scons >= 1.2
25 BuildRequires: sed >= 4.0
26 BuildRequires: v8-devel
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Mongo (from "huMONGOus") is a schema-free document-oriented database.
31 It features dynamic profileable queries, full indexing, replication
32 and fail-over support, efficient storage of large binary data objects,
35 This package provides the mongo shell, import/export tools, and other
39 Summary: Headers and libraries for mongo development
40 Group: Development/Libraries
41 Requires: %{name} = %{version}-%{release}
44 Mongo (from "huMONGOus") is a schema-free document-oriented database.
46 This package provides the mongo static library and header files needed
47 to develop mongo client software.
50 Summary: MongoDB server, sharding server, and support scripts
51 Group: Applications/Databases
52 Requires: %{name} = %{version}-%{release}
53 Provides: group(mongod)
54 Provides: user(mongod)
55 Requires(post,preun): /sbin/chkconfig
56 Requires(postun): /usr/sbin/groupdel
57 Requires(postun): /usr/sbin/userdel
58 Requires(pre): /bin/id
59 Requires(pre): /usr/bin/getgid
60 Requires(pre): /usr/sbin/groupadd
61 Requires(pre): /usr/sbin/useradd
65 Mongo (from "huMONGOus") is a schema-free document-oriented database.
67 This package provides the mongo server software, mongo sharding server
68 softwware, default configuration files, and init.d scripts.
71 %setup -q -n %{name}-src-r%{version}
73 %{__sed} -i 's,-O3,,' SConstruct
76 find -type f -executable | xargs chmod a-x
80 --prefix=$RPM_BUILD_ROOT%{_prefix} \
86 # XXX really should have shared library here
89 rm -rf $RPM_BUILD_ROOT
90 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
91 $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
92 $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
95 --prefix=$RPM_BUILD_ROOT%{_prefix} \
100 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
101 cp -a rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
103 cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
104 cp -a rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
106 cp -a debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
108 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
111 rm -rf $RPM_BUILD_ROOT
114 %groupadd -g 258 -r mongod
115 %useradd -u 258 -r -g mongod -d %{_var}/lib/mongo -s /bin/false -c "MongoDB Database Server" mongod
118 /sbin/chkconfig --add mongod
119 %service mongod restart
122 if [ "$1" = "0" ]; then
123 %service -q mongod stop
124 /sbin/chkconfig --del mongod
128 if [ "$1" = "0" ]; then
134 %defattr(644,root,root,755)
135 %doc README GNU-AGPL-3.0.txt
136 %attr(755,root,root) %{_bindir}/mongo
137 %attr(755,root,root) %{_bindir}/mongodump
138 %attr(755,root,root) %{_bindir}/mongoexport
139 %attr(755,root,root) %{_bindir}/mongofiles
140 %attr(755,root,root) %{_bindir}/mongoimport
141 %attr(755,root,root) %{_bindir}/mongorestore
142 #%%attr(755,root,root) %{_bindir}/mongosniff
143 %attr(755,root,root) %{_bindir}/mongostat
144 %attr(755,root,root) %{_bindir}/bsondump
145 %{_mandir}/man1/mongo.1*
146 %{_mandir}/man1/mongod.1*
147 %{_mandir}/man1/mongodump.1*
148 %{_mandir}/man1/mongoexport.1*
149 %{_mandir}/man1/mongofiles.1*
150 %{_mandir}/man1/mongoimport.1*
151 %{_mandir}/man1/mongosniff.1*
152 %{_mandir}/man1/mongostat.1*
153 %{_mandir}/man1/mongorestore.1*
156 %defattr(644,root,root,755)
158 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mongod.conf
159 %attr(754,root,root) /etc/rc.d/init.d/mongod
160 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mongod
161 %config(noreplace) /etc/logrotate.d/mongod
162 %attr(755,root,root) %{_bindir}/mongod
163 %attr(755,root,root) %{_bindir}/mongos
164 %{_mandir}/man1/mongos.1*
165 %attr(755,mongod,mongod) %dir %{_var}/lib/mongo
166 %attr(755,mongod,mongod) %dir %{_var}/log/mongo
167 %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log
170 %defattr(644,root,root,755)
172 %{_libdir}/libmongoclient.a
173 %{_libdir}/libmongoclient.so
174 #%{_libdir}/libmongotestfiles.a