2 # - fix 'libs' subpackage (disabled due to broken 'sharedclient' build option)
4 Summary: MongoDB client shell and tools
5 Summary(pl.UTF-8): Powłoka kliencka i narzędzia dla bazy danych MongoDB
10 Group: Applications/Databases
11 Source0: http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
12 # Source0-md5: 832bdb6cc659176fd8d6b16a660ccfc6
13 Source1: %{name}.logrotate
15 Patch0: %{name}-cflags.patch
16 Patch1: %{name}-system-libs.patch
17 Patch2: boost-1.50.patch
18 Patch3: %{name}-install.patch
19 URL: http://www.mongodb.org/
20 BuildRequires: boost-devel >= 1.42
21 BuildRequires: libpcap-devel
22 BuildRequires: libstdc++-devel >= 6:4.0
23 BuildRequires: pcre-cxx-devel
24 BuildRequires: pcre-devel >= 8.30
25 BuildRequires: readline-devel
26 BuildRequires: rpmbuild(macros) >= 1.228
27 BuildRequires: scons >= 1.2
28 BuildRequires: sed >= 4.0
29 BuildRequires: snappy-devel
30 BuildRequires: v8-devel
31 Requires: %{name}-libs = %{version}-%{release}
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Mongo (from "huMONGOus") is a schema-free document-oriented database.
36 It features dynamic profileable queries, full indexing, replication
37 and fail-over support, efficient storage of large binary data objects,
40 This package provides the mongo shell, import/export tools, and other
43 %description -l pl.UTF-8
44 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
45 pozbawione schematu. Obsługuje dynamicznie profilowane zapytania,
46 pełne indeksowanie, replikację i fail-over, wydajne składowanie dużych
47 obiektów danych binarnych oraz automatyczne dzielenie.
49 Ten pakiet zawiera powłokę mongo, narzędzia do eksportu/importu danych
50 oraz inne narzędzia klienckie.
53 Summary: MongoDB client library
54 Summary(pl.UTF-8): Biblioteka kliencka MongoDB
58 Mongo (from "huMONGOus") is a schema-free document-oriented database.
60 This package provides the mongo client library.
62 %description libs -l pl.UTF-8
63 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
66 Ten pakiet zawiera bibliotekę kliencką mongo.
69 Summary: Header files for MongoDB client library
70 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej MongoDB
71 Group: Development/Libraries
72 #Requires: %{name}-libs = %{version}-%{release}
73 Requires: %{name}-static = %{version}-%{release}
76 Mongo (from "huMONGOus") is a schema-free document-oriented database.
78 This package provides the header files needed to develop MongoDB
81 %description devel -l pl.UTF-8
82 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
85 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia
86 oprogramowania klienckiego dla MongoDB.
89 Summary: Static MongoDB client library
90 Summary(pl.UTF-8): Statyczna biblioteka kliencka MongoDB
91 Group: Development/Libraries
92 Requires: %{name}-libs = %{version}-%{release}
95 Mongo (from "huMONGOus") is a schema-free document-oriented database.
97 This package provides the MongoDB static client library.
99 %description static -l pl.UTF-8
100 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
103 Ten pakiet zawiera statyczną bibliotekę kliencką MongoDB.
106 Summary: MongoDB server, sharding server, and support scripts
107 Summary(pl.UTF-8): Serwer MongoDB, serwer dzielący oraz skrypty pomocnicze
108 Group: Applications/Databases
109 Requires: %{name} = %{version}-%{release}
110 Requires(post,preun): /sbin/chkconfig
111 Requires(postun): /usr/sbin/groupdel
112 Requires(postun): /usr/sbin/userdel
113 Requires(pre): /bin/id
114 Requires(pre): /usr/bin/getgid
115 Requires(pre): /usr/sbin/groupadd
116 Requires(pre): /usr/sbin/useradd
118 Provides: group(mongod)
119 Provides: user(mongod)
120 Conflicts: logrotate < 3.8.0
123 Mongo (from "huMONGOus") is a schema-free document-oriented database.
125 This package provides the mongo server software, mongo sharding server
126 software, default configuration files, and init.d scripts.
128 %description server -l pl.UTF-8
129 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
132 Ten pakiet zawiera serwer mongo, serwer dzielący, pliki domyślnej
133 konfiguracji oraz skrypty init.d.
136 %setup -q -n %{name}-src-r%{version}
143 find -type f -executable | xargs chmod a-x
145 # force system pcre/js/snappy
146 %{__rm} -r src/third_party/{js-1.7,pcre-8.30,snappy,boost}
150 CPPFLAGS="%{rpmcppflags} -DXP_UNIX" \
151 --use-system-all=yes \
152 --extralib=pcrecpp,pcre,snappy \
153 --prefix=$RPM_BUILD_ROOT%{_prefix} \
159 rm -rf $RPM_BUILD_ROOT
160 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
161 $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mongod} \
162 $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
164 # XXX: scons is so great, recompiles everything here!
166 --use-system-all=yes \
167 --extralib=pcrecpp,pcre,snappy \
168 --prefix=$RPM_BUILD_ROOT%{_prefix} \
173 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
174 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
175 cp -p rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
176 cp -p rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod/default.conf
177 cp -p debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
179 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
182 rm -rf $RPM_BUILD_ROOT
184 %post libs -p /sbin/ldconfig
185 %postun libs -p /sbin/ldconfig
188 %groupadd -g 258 -r mongod
189 %useradd -u 258 -r -g mongod -d %{_var}/lib/mongo -s /bin/false -c "MongoDB Database Server" mongod
192 /sbin/chkconfig --add mongod
193 %service mongod restart
196 if [ "$1" = "0" ]; then
197 %service -q mongod stop
198 /sbin/chkconfig --del mongod
202 if [ "$1" = "0" ]; then
207 %triggerpostun server -- %{name}-server < 2.0.6-3
208 if [ -f %{_sysconfdir}/mongod.conf.rpmsave ] ; then
209 cp -f %{_sysconfdir}/mongod/default.conf{,.rpmnew} || :
210 echo "Moving %{_sysconfdir}/mongod.conf to %{_sysconfdir}/mongod/default.conf"
211 mv -f %{_sysconfdir}/mongod.conf.rpmsave %{_sysconfdir}/mongod/default.conf
212 %service mongod restart
216 %defattr(644,root,root,755)
217 %doc README GNU-AGPL-3.0.txt
218 %attr(755,root,root) %{_bindir}/bsondump
219 %attr(755,root,root) %{_bindir}/mongo
220 %attr(755,root,root) %{_bindir}/mongodump
221 %attr(755,root,root) %{_bindir}/mongoexport
222 %attr(755,root,root) %{_bindir}/mongofiles
223 %attr(755,root,root) %{_bindir}/mongoimport
224 %attr(755,root,root) %{_bindir}/mongorestore
225 %attr(755,root,root) %{_bindir}/mongosniff
226 %attr(755,root,root) %{_bindir}/mongostat
227 %attr(755,root,root) %{_bindir}/mongotop
228 %{_mandir}/man1/bsondump.1*
229 %{_mandir}/man1/mongo.1*
230 %{_mandir}/man1/mongodump.1*
231 %{_mandir}/man1/mongoexport.1*
232 %{_mandir}/man1/mongofiles.1*
233 %{_mandir}/man1/mongoimport.1*
234 %{_mandir}/man1/mongosniff.1*
235 %{_mandir}/man1/mongostat.1*
236 %{_mandir}/man1/mongorestore.1*
240 %defattr(644,root,root,755)
241 %attr(755,root,root) %{_libdir}/libmongoclient.so
245 %defattr(644,root,root,755)
249 %defattr(644,root,root,755)
250 %{_libdir}/libmongoclient.a
253 %defattr(644,root,root,755)
255 %dir %{_sysconfdir}/mongod
256 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mongod/default.conf
257 %attr(754,root,root) /etc/rc.d/init.d/mongod
258 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mongod
259 %config(noreplace) /etc/logrotate.d/mongod
260 %attr(755,root,root) %{_bindir}/mongod
261 %attr(755,root,root) %{_bindir}/mongos
262 %{_mandir}/man1/mongod.1*
263 %{_mandir}/man1/mongos.1*
264 %attr(755,mongod,mongod) %dir %{_var}/lib/mongo
265 %attr(775,root,mongod) %dir %{_var}/log/mongo
266 %attr(775,root,mongod) %dir %{_var}/log/archive/mongo
267 %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log