1 # TODO: pass rpmldflags
2 Summary: MongoDB client shell and tools
3 Summary(pl.UTF-8): Powłoka kliencka i narzędzia dla bazy danych MongoDB
8 Group: Applications/Databases
9 Source0: http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
10 # Source0-md5: b3b32fecdcbe8e8068ec2989be9d2da4
11 Source1: %{name}.logrotate
14 Patch1: %{name}-system-libs.patch
15 Patch2: %{name}-build.patch
16 Patch3: boost-1.50.patch
17 URL: http://www.mongodb.org/
18 BuildRequires: boost-devel >= 1.42
19 BuildRequires: libpcap-devel
20 BuildRequires: libstdc++-devel >= 6:4.0
21 BuildRequires: pcre-cxx-devel
22 BuildRequires: pcre-devel
23 BuildRequires: readline-devel
24 BuildRequires: rpmbuild(macros) >= 1.228
25 BuildRequires: scons >= 1.2
26 BuildRequires: sed >= 4.0
27 BuildRequires: snappy-devel
28 BuildRequires: v8-devel
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Mongo (from "huMONGOus") is a schema-free document-oriented database.
33 It features dynamic profileable queries, full indexing, replication
34 and fail-over support, efficient storage of large binary data objects,
37 This package provides the mongo shell, import/export tools, and other
40 %description -l pl.UTF-8
41 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
42 pozbawione schematu. Obsługuje dynamicznie profilowane zapytania,
43 pełne indeksowanie, replikację i fail-over, wydajne składowanie dużych
44 obiektów danych binarnych oraz automatyczne dzielenie.
46 Ten pakiet zawiera powłokę mongo, narzędzia do eksportu/importu danych
47 oraz inne narzędzia klienckie.
50 Summary: MongoDB client library
51 Summary(pl.UTF-8): Biblioteka kliencka MongoDB
55 Mongo (from "huMONGOus") is a schema-free document-oriented database.
57 This package provides the mongo client library.
59 %description libs -l pl.UTF-8
60 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
63 Ten pakiet zawiera bibliotekę kliencką mongo.
66 Summary: Header files for MongoDB client library
67 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej MongoDB
68 Group: Development/Libraries
69 Requires: %{name}-libs = %{version}-%{release}
72 Mongo (from "huMONGOus") is a schema-free document-oriented database.
74 This package provides the header files needed to develop MongoDB
77 %description devel -l pl.UTF-8
78 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
81 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia
82 oprogramowania klienckiego dla MongoDB.
85 Summary: Static MongoDB client library
86 Summary(pl.UTF-8): Statyczna biblioteka kliencka MongoDB
87 Group: Development/Libraries
88 Requires: %{name}-libs = %{version}-%{release}
91 Mongo (from "huMONGOus") is a schema-free document-oriented database.
93 This package provides the MongoDB static client library.
95 %description static -l pl.UTF-8
96 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
99 Ten pakiet zawiera statyczną bibliotekę kliencką MongoDB.
102 Summary: MongoDB server, sharding server, and support scripts
103 Summary(pl.UTF-8): Serwer MongoDB, serwer dzielący oraz skrypty pomocnicze
104 Group: Applications/Databases
105 Requires: %{name} = %{version}-%{release}
106 Requires(post,preun): /sbin/chkconfig
107 Requires(postun): /usr/sbin/groupdel
108 Requires(postun): /usr/sbin/userdel
109 Requires(pre): /bin/id
110 Requires(pre): /usr/bin/getgid
111 Requires(pre): /usr/sbin/groupadd
112 Requires(pre): /usr/sbin/useradd
114 Provides: group(mongod)
115 Provides: user(mongod)
116 Conflicts: logrotate < 3.8.0
119 Mongo (from "huMONGOus") is a schema-free document-oriented database.
121 This package provides the mongo server software, mongo sharding server
122 software, default configuration files, and init.d scripts.
124 %description server -l pl.UTF-8
125 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
128 Ten pakiet zawiera serwer mongo, serwer dzielący, pliki domyślnej
129 konfiguracji oraz skrypty init.d.
132 %setup -q -n %{name}-src-r%{version}
137 %{__sed} -i -e 's,-O3,%{rpmcxxflags} %{rpmcppflags},' SConstruct
140 find -type f -executable | xargs chmod a-x
142 # force system pcre/js/snappy
143 %{__rm} -r third_party/{js-1.7,pcre-7.4,snappy,*.py}
147 --prefix=$RPM_BUILD_ROOT%{_prefix} \
154 rm -rf $RPM_BUILD_ROOT
155 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
156 $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mongod} \
157 $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
159 # XXX: scons is so great, recompiles everything here!
161 --prefix=$RPM_BUILD_ROOT%{_prefix} \
167 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
168 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
169 cp -p rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
170 cp -p rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod/default.conf
171 cp -p debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
173 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
176 rm -rf $RPM_BUILD_ROOT
178 %post libs -p /sbin/ldconfig
179 %postun libs -p /sbin/ldconfig
182 %groupadd -g 258 -r mongod
183 %useradd -u 258 -r -g mongod -d %{_var}/lib/mongo -s /bin/false -c "MongoDB Database Server" mongod
186 /sbin/chkconfig --add mongod
187 %service mongod restart
190 if [ "$1" = "0" ]; then
191 %service -q mongod stop
192 /sbin/chkconfig --del mongod
196 if [ "$1" = "0" ]; then
201 %triggerpostun server -- %{name}-server < 2.0.6-3
202 if [ -f %{_sysconfdir}/mongod.conf.rpmsave ] ; then
203 cp -f %{_sysconfdir}/mongod/default.conf{,.rpmnew} || :
204 echo "Moving %{_sysconfdir}/mongod.conf to %{_sysconfdir}/mongod/default.conf"
205 mv -f %{_sysconfdir}/mongod.conf.rpmsave %{_sysconfdir}/mongod/default.conf
206 %service mongod restart
210 %defattr(644,root,root,755)
211 %doc README GNU-AGPL-3.0.txt
212 %attr(755,root,root) %{_bindir}/bsondump
213 %attr(755,root,root) %{_bindir}/mongo
214 %attr(755,root,root) %{_bindir}/mongodump
215 %attr(755,root,root) %{_bindir}/mongoexport
216 %attr(755,root,root) %{_bindir}/mongofiles
217 %attr(755,root,root) %{_bindir}/mongoimport
218 %attr(755,root,root) %{_bindir}/mongorestore
219 %attr(755,root,root) %{_bindir}/mongosniff
220 %attr(755,root,root) %{_bindir}/mongostat
221 %attr(755,root,root) %{_bindir}/mongotop
222 %{_mandir}/man1/bsondump.1*
223 %{_mandir}/man1/mongo.1*
224 %{_mandir}/man1/mongodump.1*
225 %{_mandir}/man1/mongoexport.1*
226 %{_mandir}/man1/mongofiles.1*
227 %{_mandir}/man1/mongoimport.1*
228 %{_mandir}/man1/mongosniff.1*
229 %{_mandir}/man1/mongostat.1*
230 %{_mandir}/man1/mongorestore.1*
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{_libdir}/libmongoclient.so
237 %defattr(644,root,root,755)
241 %defattr(644,root,root,755)
242 %{_libdir}/libmongoclient.a
245 %defattr(644,root,root,755)
247 %dir %{_sysconfdir}/mongod
248 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mongod/default.conf
249 %attr(754,root,root) /etc/rc.d/init.d/mongod
250 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mongod
251 %config(noreplace) /etc/logrotate.d/mongod
252 %attr(755,root,root) %{_bindir}/mongod
253 %attr(755,root,root) %{_bindir}/mongos
254 %{_mandir}/man1/mongod.1*
255 %{_mandir}/man1/mongos.1*
256 %attr(755,mongod,mongod) %dir %{_var}/lib/mongo
257 %attr(755,mongod,mongod) %dir %{_var}/log/mongo
258 %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log