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: 99f1c4c256be1611da6068aea30f9a30
14 Source1: %{name}.logrotate
16 # BuildRequires: libpcap-devel
17 BuildRequires: boost-devel >= 1.42
18 BuildRequires: libstdc++-devel >= 6:4.0
19 BuildRequires: pcre-cxx-devel
20 BuildRequires: pcre-devel
21 BuildRequires: readline-devel
22 BuildRequires: rpmbuild(macros) >= 1.228
23 BuildRequires: scons >= 1.2
24 BuildRequires: sed >= 4.0
25 BuildRequires: v8-devel
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Mongo (from "huMONGOus") is a schema-free document-oriented database.
30 It features dynamic profileable queries, full indexing, replication
31 and fail-over support, efficient storage of large binary data objects,
34 This package provides the mongo shell, import/export tools, and other
38 Summary: Headers and libraries for mongo development
39 Group: Development/Libraries
40 Requires: %{name} = %{version}-%{release}
43 Mongo (from "huMONGOus") is a schema-free document-oriented database.
45 This package provides the mongo static library and header files needed
46 to develop mongo client software.
49 Summary: MongoDB server, sharding server, and support scripts
50 Group: Applications/Databases
51 Requires: %{name} = %{version}-%{release}
52 Provides: group(mongod)
53 Provides: user(mongod)
54 Requires(post,preun): /sbin/chkconfig
55 Requires(postun): /usr/sbin/groupdel
56 Requires(postun): /usr/sbin/userdel
57 Requires(pre): /bin/id
58 Requires(pre): /usr/bin/getgid
59 Requires(pre): /usr/sbin/groupadd
60 Requires(pre): /usr/sbin/useradd
64 Mongo (from "huMONGOus") is a schema-free document-oriented database.
66 This package provides the mongo server software, mongo sharding server
67 softwware, default configuration files, and init.d scripts.
70 %setup -q -n %{name}-src-r%{version}
71 %{__sed} -i 's,-O3,,' SConstruct
74 find -type f -executable | xargs chmod a-x
78 --prefix=$RPM_BUILD_ROOT%{_prefix} \
84 # XXX really should have shared library here
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
89 $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
90 $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
93 --prefix=$RPM_BUILD_ROOT%{_prefix} \
98 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
99 cp -a rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
101 cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
102 cp -a rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
104 cp -a debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
106 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
109 rm -rf $RPM_BUILD_ROOT
112 %groupadd -g 258 -r mongod
113 %useradd -u 258 -r -g mongod -d %{_var}/lib/mongo -s /bin/false -c "MongoDB Database Server" mongod
116 /sbin/chkconfig --add mongod
117 %service mongod restart
120 if [ "$1" = "0" ]; then
121 %service -q mongod stop
122 /sbin/chkconfig --del mongod
126 if [ "$1" = "0" ]; then
132 %defattr(644,root,root,755)
133 %doc README GNU-AGPL-3.0.txt
134 %attr(755,root,root) %{_bindir}/mongo
135 %attr(755,root,root) %{_bindir}/mongodump
136 %attr(755,root,root) %{_bindir}/mongoexport
137 %attr(755,root,root) %{_bindir}/mongofiles
138 %attr(755,root,root) %{_bindir}/mongoimport
139 %attr(755,root,root) %{_bindir}/mongorestore
140 %attr(755,root,root) %{_bindir}/mongosniff
141 %attr(755,root,root) %{_bindir}/mongostat
142 %attr(755,root,root) %{_bindir}/bsondump
143 %{_mandir}/man1/mongo.1*
144 %{_mandir}/man1/mongod.1*
145 %{_mandir}/man1/mongodump.1*
146 %{_mandir}/man1/mongoexport.1*
147 %{_mandir}/man1/mongofiles.1*
148 %{_mandir}/man1/mongoimport.1*
149 %{_mandir}/man1/mongosniff.1*
150 %{_mandir}/man1/mongostat.1*
151 %{_mandir}/man1/mongorestore.1*
154 %defattr(644,root,root,755)
156 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mongod.conf
157 %attr(754,root,root) /etc/rc.d/init.d/mongod
158 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mongod
159 %config(noreplace) /etc/logrotate.d/mongod
160 %attr(755,root,root) %{_bindir}/mongod
161 %attr(755,root,root) %{_bindir}/mongos
162 %{_mandir}/man1/mongos.1*
163 %attr(755,mongod,mongod) %dir %{_var}/lib/mongo
164 %attr(755,mongod,mongod) %dir %{_var}/log/mongo
165 %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log
168 %defattr(644,root,root,755)
170 %{_libdir}/libmongoclient.a
171 %{_libdir}/libmongoclient.so
172 #%{_libdir}/libmongotestfiles.a