2 # - pld useradd/groupadd (register uid/gid)
3 Summary: MongoDB client shell and tools
8 Group: Applications/Databases
9 URL: http://www.mongodb.org/
10 Source0: http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
11 # Source0-md5: 358bfc52855a66d3c954e7f6f51bcd12
12 Source1: %{name}.logrotate
14 # BuildRequires: libpcap-devel
15 BuildRequires: boost-devel >= 1.42
16 BuildRequires: libstdc++-devel >= 6:4.0
17 BuildRequires: pcre-cxx-devel
18 BuildRequires: pcre-devel
19 BuildRequires: readline-devel
20 BuildRequires: scons >= 1.2
21 BuildRequires: v8-devel
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 Mongo (from "huMONGOus") is a schema-free document-oriented database.
26 It features dynamic profileable queries, full indexing, replication
27 and fail-over support, efficient storage of large binary data objects,
30 This package provides the mongo shell, import/export tools, and other
34 Summary: Headers and libraries for mongo development
35 Group: Development/Libraries
36 Requires: %{name} = %{version}-%{release}
39 Mongo (from "huMONGOus") is a schema-free document-oriented database.
41 This package provides the mongo static library and header files needed
42 to develop mongo client software.
45 Summary: MongoDB server, sharding server, and support scripts
46 Group: Applications/Databases
47 Requires: %{name} = %{version}-%{release}
50 Mongo (from "huMONGOus") is a schema-free document-oriented database.
52 This package provides the mongo server software, mongo sharding server
53 softwware, default configuration files, and init.d scripts.
56 %setup -q -n %{name}-src-r%{version}
59 find -type f -executable | xargs chmod a-x
63 --prefix=$RPM_BUILD_ROOT%{_prefix} \
68 # XXX really should have shared library here
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
73 $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
74 $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
77 --prefix=$RPM_BUILD_ROOT%{_prefix} \
82 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
83 cp -a rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
85 cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
86 cp -a rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
88 cp -a debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
90 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
93 rm -rf $RPM_BUILD_ROOT
96 groupadd -r mongod 2>/dev/null || :
97 useradd -r -g mongod -d %{_var}/lib/mongo -s /sbin/nologin -c "user for MongoDB Database Server" mongod 2>/dev/null || :
100 #%fillup_and_insserv -n mongod mongod
101 #%restart_on_update mongod
104 #%stop_on_removal mongod
109 %defattr(644,root,root,755)
110 %doc README GNU-AGPL-3.0.txt
111 %attr(755,root,root) %{_bindir}/mongo
112 %attr(755,root,root) %{_bindir}/mongodump
113 %attr(755,root,root) %{_bindir}/mongoexport
114 %attr(755,root,root) %{_bindir}/mongofiles
115 %attr(755,root,root) %{_bindir}/mongoimport
116 %attr(755,root,root) %{_bindir}/mongorestore
117 %attr(755,root,root) %{_bindir}/mongostat
118 %attr(755,root,root) %{_bindir}/bsondump
119 %{_mandir}/man1/mongo.1*
120 %{_mandir}/man1/mongod.1*
121 %{_mandir}/man1/mongodump.1*
122 %{_mandir}/man1/mongoexport.1*
123 %{_mandir}/man1/mongofiles.1*
124 %{_mandir}/man1/mongoimport.1*
125 %{_mandir}/man1/mongosniff.1*
126 %{_mandir}/man1/mongostat.1*
127 %{_mandir}/man1/mongorestore.1*
130 %defattr(644,root,root,755)
132 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mongod.conf
133 %attr(754,root,root) /etc/rc.d/init.d/mongod
134 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mongod
135 %config(noreplace) /etc/logrotate.d/mongod
136 %attr(755,root,root) %{_bindir}/mongod
137 %attr(755,root,root) %{_bindir}/mongos
138 %{_mandir}/man1/mongos.1*
139 %attr(755,mongod,mongod) %dir %{_var}/lib/mongo
140 %attr(755,mongod,mongod) %dir %{_var}/log/mongo
141 %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log
144 %defattr(644,root,root,755)
146 %{_libdir}/libmongoclient.a
147 %{_libdir}/libmongoclient.so
148 #%{_libdir}/libmongotestfiles.a