3 # - pass our rpm*cflags, use CXX
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: 4df15dba13d7e743f0148127122baec6
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: v8-devel
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Mongo (from "huMONGOus") is a schema-free document-oriented database.
29 It features dynamic profileable queries, full indexing, replication
30 and fail-over support, efficient storage of large binary data objects,
33 This package provides the mongo shell, import/export tools, and other
37 Summary: Headers and libraries for mongo development
38 Group: Development/Libraries
39 Requires: %{name} = %{version}-%{release}
42 Mongo (from "huMONGOus") is a schema-free document-oriented database.
44 This package provides the mongo static library and header files needed
45 to develop mongo client software.
48 Summary: MongoDB server, sharding server, and support scripts
49 Group: Applications/Databases
50 Requires: %{name} = %{version}-%{release}
51 Provides: group(mongod)
52 Provides: user(mongod)
53 Requires(post,preun): /sbin/chkconfig
54 Requires(postun): /usr/sbin/groupdel
55 Requires(postun): /usr/sbin/userdel
56 Requires(pre): /bin/id
57 Requires(pre): /usr/bin/getgid
58 Requires(pre): /usr/sbin/groupadd
59 Requires(pre): /usr/sbin/useradd
63 Mongo (from "huMONGOus") is a schema-free document-oriented database.
65 This package provides the mongo server software, mongo sharding server
66 softwware, default configuration files, and init.d scripts.
69 %setup -q -n %{name}-src-r%{version}
72 find -type f -executable | xargs chmod a-x
76 --prefix=$RPM_BUILD_ROOT%{_prefix} \
81 # XXX really should have shared library here
84 rm -rf $RPM_BUILD_ROOT
85 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
86 $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
87 $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
90 --prefix=$RPM_BUILD_ROOT%{_prefix} \
95 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
96 cp -a rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
98 cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
99 cp -a rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
101 cp -a debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
103 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
106 rm -rf $RPM_BUILD_ROOT
109 %groupadd -g 258 -r mongod
110 %useradd -u 258 -r -g mongod -d %{_var}/lib/mongo -s /bin/false -c "MongoDB Database Server" mongod
113 /sbin/chkconfig --add mongod
114 %service mongod restart
117 if [ "$1" = "0" ]; then
118 %service -q mongod stop
119 /sbin/chkconfig --del mongod
123 if [ "$1" = "0" ]; then
129 %defattr(644,root,root,755)
130 %doc README GNU-AGPL-3.0.txt
131 %attr(755,root,root) %{_bindir}/mongo
132 %attr(755,root,root) %{_bindir}/mongodump
133 %attr(755,root,root) %{_bindir}/mongoexport
134 %attr(755,root,root) %{_bindir}/mongofiles
135 %attr(755,root,root) %{_bindir}/mongoimport
136 %attr(755,root,root) %{_bindir}/mongorestore
137 %attr(755,root,root) %{_bindir}/mongostat
138 %attr(755,root,root) %{_bindir}/bsondump
139 %{_mandir}/man1/mongo.1*
140 %{_mandir}/man1/mongod.1*
141 %{_mandir}/man1/mongodump.1*
142 %{_mandir}/man1/mongoexport.1*
143 %{_mandir}/man1/mongofiles.1*
144 %{_mandir}/man1/mongoimport.1*
145 %{_mandir}/man1/mongosniff.1*
146 %{_mandir}/man1/mongostat.1*
147 %{_mandir}/man1/mongorestore.1*
150 %defattr(644,root,root,755)
152 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mongod.conf
153 %attr(754,root,root) /etc/rc.d/init.d/mongod
154 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mongod
155 %config(noreplace) /etc/logrotate.d/mongod
156 %attr(755,root,root) %{_bindir}/mongod
157 %attr(755,root,root) %{_bindir}/mongos
158 %{_mandir}/man1/mongos.1*
159 %attr(755,mongod,mongod) %dir %{_var}/lib/mongo
160 %attr(755,mongod,mongod) %dir %{_var}/log/mongo
161 %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log
164 %defattr(644,root,root,755)
166 %{_libdir}/libmongoclient.a
167 %{_libdir}/libmongoclient.so
168 #%{_libdir}/libmongotestfiles.a