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: cb8579074b7c9752eb382a2094ac4523
11 Source1: %{name}.logrotate
14 Patch1: %{name}-system-libs.patch
15 Patch2: %{name}-build.patch
16 URL: http://www.mongodb.org/
17 BuildRequires: boost-devel >= 1.42
18 BuildRequires: libpcap-devel
19 BuildRequires: libstdc++-devel >= 6:4.0
20 BuildRequires: pcre-cxx-devel
21 BuildRequires: pcre-devel
22 BuildRequires: readline-devel
23 BuildRequires: rpmbuild(macros) >= 1.228
24 BuildRequires: scons >= 1.2
25 BuildRequires: sed >= 4.0
26 BuildRequires: snappy-devel
27 BuildRequires: v8-devel
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Mongo (from "huMONGOus") is a schema-free document-oriented database.
32 It features dynamic profileable queries, full indexing, replication
33 and fail-over support, efficient storage of large binary data objects,
36 This package provides the mongo shell, import/export tools, and other
39 %description -l pl.UTF-8
40 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
41 pozbawione schematu. Obsługuje dynamicznie profilowane zapytania,
42 pełne indeksowanie, replikację i fail-over, wydajne składowanie dużych
43 obiektów danych binarnych oraz automatyczne dzielenie.
45 Ten pakiet zawiera powłokę mongo, narzędzia do eksportu/importu danych
46 oraz inne narzędzia klienckie.
49 Summary: MongoDB client library
50 Summary(pl.UTF-8): Biblioteka kliencka MongoDB
54 Mongo (from "huMONGOus") is a schema-free document-oriented database.
56 This package provides the mongo client library.
58 %description libs -l pl.UTF-8
59 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
62 Ten pakiet zawiera bibliotekę kliencką mongo.
65 Summary: Header files for MongoDB client library
66 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej MongoDB
67 Group: Development/Libraries
68 Requires: %{name}-libs = %{version}-%{release}
71 Mongo (from "huMONGOus") is a schema-free document-oriented database.
73 This package provides the header files needed to develop MongoDB
76 %description devel -l pl.UTF-8
77 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
80 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia
81 oprogramowania klienckiego dla MongoDB.
84 Summary: Static MongoDB client library
85 Summary(pl.UTF-8): Statyczna biblioteka kliencka MongoDB
86 Group: Development/Libraries
87 Requires: %{name}-libs = %{version}-%{release}
90 Mongo (from "huMONGOus") is a schema-free document-oriented database.
92 This package provides the MongoDB static client library.
94 %description static -l pl.UTF-8
95 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
98 Ten pakiet zawiera statyczną bibliotekę kliencką MongoDB.
101 Summary: MongoDB server, sharding server, and support scripts
102 Summary(pl.UTF-8): Serwer MongoDB, serwer dzielący oraz skrypty pomocnicze
103 Group: Applications/Databases
104 Requires: %{name} = %{version}-%{release}
105 Provides: group(mongod)
106 Provides: user(mongod)
107 Requires(post,preun): /sbin/chkconfig
108 Requires(postun): /usr/sbin/groupdel
109 Requires(postun): /usr/sbin/userdel
110 Requires(pre): /bin/id
111 Requires(pre): /usr/bin/getgid
112 Requires(pre): /usr/sbin/groupadd
113 Requires(pre): /usr/sbin/useradd
117 Mongo (from "huMONGOus") is a schema-free document-oriented database.
119 This package provides the mongo server software, mongo sharding server
120 software, default configuration files, and init.d scripts.
122 %description server -l pl.UTF-8
123 Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty
126 Ten pakiet zawiera serwer mongo, serwer dzielący, pliki domyślnej
127 konfiguracji oraz skrypty init.d.
130 %setup -q -n %{name}-src-r%{version}
134 %{__sed} -i -e 's,-O3,%{rpmcxxflags} %{rpmcppflags},' SConstruct
137 find -type f -executable | xargs chmod a-x
139 # force system pcre/js/snappy
140 %{__rm} -r third_party/{js-1.7,pcre-7.4,snappy,*.py}
143 export LDFLAGS="%{rpmldflags} =-fuse-ld=bfd"
145 --prefix=$RPM_BUILD_ROOT%{_prefix} \
152 rm -rf $RPM_BUILD_ROOT
153 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
154 $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
155 $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
157 # XXX: scons is so great, recompiles everything here!
158 export LDFLAGS="%{rpmldflags} =-fuse-ld=bfd"
160 --prefix=$RPM_BUILD_ROOT%{_prefix} \
166 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
167 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
168 cp -p rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
169 cp -p rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
170 cp -p debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
172 touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log
175 rm -rf $RPM_BUILD_ROOT
177 %post libs -p /sbin/ldconfig
178 %postun libs -p /sbin/ldconfig
181 %groupadd -g 258 -r mongod
182 %useradd -u 258 -r -g mongod -d %{_var}/lib/mongo -s /bin/false -c "MongoDB Database Server" mongod
185 /sbin/chkconfig --add mongod
186 %service mongod restart
189 if [ "$1" = "0" ]; then
190 %service -q mongod stop
191 /sbin/chkconfig --del mongod
195 if [ "$1" = "0" ]; then
201 %defattr(644,root,root,755)
202 %doc README GNU-AGPL-3.0.txt
203 %attr(755,root,root) %{_bindir}/bsondump
204 %attr(755,root,root) %{_bindir}/mongo
205 %attr(755,root,root) %{_bindir}/mongodump
206 %attr(755,root,root) %{_bindir}/mongoexport
207 %attr(755,root,root) %{_bindir}/mongofiles
208 %attr(755,root,root) %{_bindir}/mongoimport
209 %attr(755,root,root) %{_bindir}/mongorestore
210 %attr(755,root,root) %{_bindir}/mongosniff
211 %attr(755,root,root) %{_bindir}/mongostat
212 %attr(755,root,root) %{_bindir}/mongotop
213 %{_mandir}/man1/bsondump.1*
214 %{_mandir}/man1/mongo.1*
215 %{_mandir}/man1/mongodump.1*
216 %{_mandir}/man1/mongoexport.1*
217 %{_mandir}/man1/mongofiles.1*
218 %{_mandir}/man1/mongoimport.1*
219 %{_mandir}/man1/mongosniff.1*
220 %{_mandir}/man1/mongostat.1*
221 %{_mandir}/man1/mongorestore.1*
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_libdir}/libmongoclient.so
228 %defattr(644,root,root,755)
232 %defattr(644,root,root,755)
233 %{_libdir}/libmongoclient.a
236 %defattr(644,root,root,755)
238 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mongod.conf
239 %attr(754,root,root) /etc/rc.d/init.d/mongod
240 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mongod
241 %config(noreplace) /etc/logrotate.d/mongod
242 %attr(755,root,root) %{_bindir}/mongod
243 %attr(755,root,root) %{_bindir}/mongos
244 %{_mandir}/man1/mongod.1*
245 %{_mandir}/man1/mongos.1*
246 %attr(755,mongod,mongod) %dir %{_var}/lib/mongo
247 %attr(755,mongod,mongod) %dir %{_var}/log/mongo
248 %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log