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: 65da0fe8a08917dafd11b069debbf810
11 Source1: %{name}.logrotate
14 URL: http://www.mongodb.org/
15 BuildRequires: boost-devel >= 1.42
16 BuildRequires: libpcap-devel
17 BuildRequires: libstdc++-devel >= 6:4.0
18 BuildRequires: pcre-cxx-devel
19 BuildRequires: pcre-devel
20 BuildRequires: readline-devel
21 BuildRequires: rpmbuild(macros) >= 1.228
22 BuildRequires: scons >= 1.2
23 BuildRequires: sed >= 4.0
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
36 %description -l pl.UTF-8
37 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
38 pozbawione schematu. Obsługuje dynamicznie profilowane zapytania,
39 pełne indeksowanie, replikację i fail-over, wydajne składowanie dużych
40 obiektów danych binarnych oraz automatyczne dzielenie.
42 Ten pakiet zawiera powłokę mongo, narzędzia do eksportu/importu danych
43 oraz inne narzędzia klienckie.
46 Summary: MongoDB client library
47 Summary(pl.UTF-8): Biblioteka kliencka MongoDB
51 Mongo (from "huMONGOus") is a schema-free document-oriented database.
53 This package provides the mongo client library.
55 %description libs -l pl.UTF-8
56 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
59 Ten pakiet zawiera bibliotekę kliencką mongo.
62 Summary: Header files for MongoDB client library
63 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej MongoDB
64 Group: Development/Libraries
65 Requires: %{name}-libs = %{version}-%{release}
68 Mongo (from "huMONGOus") is a schema-free document-oriented database.
70 This package provides the header files needed to develop MongoDB
73 %description devel -l pl.UTF-8
74 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
77 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia
78 oprogramowania klienckiego dla MongoDB.
81 Summary: Static MongoDB client library
82 Summary(pl.UTF-8): Statyczna biblioteka kliencka MongoDB
83 Group: Development/Libraries
84 Requires: %{name}-libs = %{version}-%{release}
87 Mongo (from "huMONGOus") is a schema-free document-oriented database.
89 This package provides the MongoDB static client library.
91 %description static -l pl.UTF-8
92 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
95 Ten pakiet zawiera statyczną bibliotekę kliencką MongoDB.
98 Summary: MongoDB server, sharding server, and support scripts
99 Summary(pl.UTF-8): Serwer MongoDB, serwer dzielący oraz skrypty pomocnicze
100 Group: Applications/Databases
101 Requires: %{name} = %{version}-%{release}
102 Provides: group(mongod)
103 Provides: user(mongod)
104 Requires(post,preun): /sbin/chkconfig
105 Requires(postun): /usr/sbin/groupdel
106 Requires(postun): /usr/sbin/userdel
107 Requires(pre): /bin/id
108 Requires(pre): /usr/bin/getgid
109 Requires(pre): /usr/sbin/groupadd
110 Requires(pre): /usr/sbin/useradd
114 Mongo (from "huMONGOus") is a schema-free document-oriented database.
116 This package provides the mongo server software, mongo sharding server
117 software, default configuration files, and init.d scripts.
119 %description server -l pl.UTF-8
120 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
123 Ten pakiet zawiera serwer mongo, serwer dzielący, pliki domyślnej
124 konfiguracji oraz skrypty init.d.
127 %setup -q -n %{name}-src-r%{version}
129 %{__sed} -i 's,-O3,%{rpmcxxflags} %{rpmcppflags},;/,\.\.\/v8/d' SConstruct
132 find -type f -executable | xargs chmod a-x
136 --prefix=$RPM_BUILD_ROOT%{_prefix} \
143 rm -rf $RPM_BUILD_ROOT
144 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
145 $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
146 $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
148 # XXX: scons is so great, recompiles everything here!
150 --prefix=$RPM_BUILD_ROOT%{_prefix} \
156 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
157 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
158 cp -p rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
159 cp -p rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
160 cp -p debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
162 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
165 rm -rf $RPM_BUILD_ROOT
167 %post libs -p /sbin/ldconfig
168 %postun libs -p /sbin/ldconfig
171 %groupadd -g 258 -r mongod
172 %useradd -u 258 -r -g mongod -d %{_var}/lib/mongo -s /bin/false -c "MongoDB Database Server" mongod
175 /sbin/chkconfig --add mongod
176 %service mongod restart
179 if [ "$1" = "0" ]; then
180 %service -q mongod stop
181 /sbin/chkconfig --del mongod
185 if [ "$1" = "0" ]; then
191 %defattr(644,root,root,755)
192 %doc README GNU-AGPL-3.0.txt
193 %attr(755,root,root) %{_bindir}/mongo
194 %attr(755,root,root) %{_bindir}/mongodump
195 %attr(755,root,root) %{_bindir}/mongoexport
196 %attr(755,root,root) %{_bindir}/mongofiles
197 %attr(755,root,root) %{_bindir}/mongoimport
198 %attr(755,root,root) %{_bindir}/mongorestore
199 %attr(755,root,root) %{_bindir}/mongosniff
200 %attr(755,root,root) %{_bindir}/mongostat
201 %attr(755,root,root) %{_bindir}/bsondump
202 %{_mandir}/man1/mongo.1*
203 %{_mandir}/man1/mongodump.1*
204 %{_mandir}/man1/mongoexport.1*
205 %{_mandir}/man1/mongofiles.1*
206 %{_mandir}/man1/mongoimport.1*
207 %{_mandir}/man1/mongosniff.1*
208 %{_mandir}/man1/mongostat.1*
209 %{_mandir}/man1/mongorestore.1*
212 %defattr(644,root,root,755)
213 %attr(755,root,root) %{_libdir}/libmongoclient.so
216 %defattr(644,root,root,755)
220 %defattr(644,root,root,755)
221 %{_libdir}/libmongoclient.a
224 %defattr(644,root,root,755)
226 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mongod.conf
227 %attr(754,root,root) /etc/rc.d/init.d/mongod
228 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mongod
229 %config(noreplace) /etc/logrotate.d/mongod
230 %attr(755,root,root) %{_bindir}/mongod
231 %attr(755,root,root) %{_bindir}/mongos
232 %{_mandir}/man1/mongod.1*
233 %{_mandir}/man1/mongos.1*
234 %attr(755,mongod,mongod) %dir %{_var}/lib/mongo
235 %attr(755,mongod,mongod) %dir %{_var}/log/mongo
236 %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log