]>
Commit | Line | Data |
---|---|---|
c9011c68 | 1 | # TODO: pass rpmldflags |
69fbae1d | 2 | Summary: MongoDB client shell and tools |
7165862f | 3 | Summary(pl.UTF-8): Powłoka kliencka i narzędzia dla bazy danych MongoDB |
69fbae1d | 4 | Name: mongodb |
04298a8b | 5 | Version: 2.0.1 |
c9011c68 JB |
6 | Release: 1 |
7 | License: AGPL v3 | |
69fbae1d | 8 | Group: Applications/Databases |
1987b887 | 9 | Source0: http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz |
04298a8b | 10 | # Source0-md5: cb8579074b7c9752eb382a2094ac4523 |
1987b887 | 11 | Source1: %{name}.logrotate |
12 | Source2: %{name}.init | |
105f2c53 | 13 | Patch0: config.patch |
04298a8b JB |
14 | Patch1: %{name}-system-libs.patch |
15 | Patch2: %{name}-build.patch | |
7165862f | 16 | URL: http://www.mongodb.org/ |
69fbae1d | 17 | BuildRequires: boost-devel >= 1.42 |
f5624e0a | 18 | BuildRequires: libpcap-devel |
c5835a7a | 19 | BuildRequires: libstdc++-devel >= 6:4.0 |
1987b887 | 20 | BuildRequires: pcre-cxx-devel |
c07fcde2 | 21 | BuildRequires: pcre-devel |
69fbae1d | 22 | BuildRequires: readline-devel |
aa21d651 | 23 | BuildRequires: rpmbuild(macros) >= 1.228 |
69fbae1d | 24 | BuildRequires: scons >= 1.2 |
75e22e92 | 25 | BuildRequires: sed >= 4.0 |
04298a8b | 26 | BuildRequires: snappy-devel |
69fbae1d | 27 | BuildRequires: v8-devel |
69fbae1d | 28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
69fbae1d | 29 | |
30 | %description | |
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, | |
34 | and auto-sharding. | |
35 | ||
36 | This package provides the mongo shell, import/export tools, and other | |
37 | client utilities. | |
38 | ||
7165862f JB |
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. | |
44 | ||
45 | Ten pakiet zawiera powłokę mongo, narzędzia do eksportu/importu danych | |
46 | oraz inne narzędzia klienckie. | |
47 | ||
f5624e0a JB |
48 | %package libs |
49 | Summary: MongoDB client library | |
50 | Summary(pl.UTF-8): Biblioteka kliencka MongoDB | |
51 | Group: Libraries | |
52 | ||
53 | %description libs | |
54 | Mongo (from "huMONGOus") is a schema-free document-oriented database. | |
55 | ||
56 | This package provides the mongo client library. | |
57 | ||
58 | %description libs -l pl.UTF-8 | |
59 | Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty | |
60 | pozbawione schematu. | |
61 | ||
62 | Ten pakiet zawiera bibliotekę kliencką mongo. | |
63 | ||
69fbae1d | 64 | %package devel |
f5624e0a JB |
65 | Summary: Header files for MongoDB client library |
66 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej MongoDB | |
69fbae1d | 67 | Group: Development/Libraries |
f5624e0a | 68 | Requires: %{name}-libs = %{version}-%{release} |
69fbae1d | 69 | |
70 | %description devel | |
71 | Mongo (from "huMONGOus") is a schema-free document-oriented database. | |
72 | ||
f5624e0a JB |
73 | This package provides the header files needed to develop MongoDB |
74 | client software. | |
69fbae1d | 75 | |
7165862f JB |
76 | %description devel -l pl.UTF-8 |
77 | Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty | |
78 | pozbawione schematu. | |
79 | ||
f5624e0a JB |
80 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia |
81 | oprogramowania klienckiego dla MongoDB. | |
82 | ||
83 | %package static | |
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} | |
88 | ||
89 | %description static | |
90 | Mongo (from "huMONGOus") is a schema-free document-oriented database. | |
91 | ||
92 | This package provides the MongoDB static client library. | |
93 | ||
94 | %description static -l pl.UTF-8 | |
95 | Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty | |
96 | pozbawione schematu. | |
97 | ||
98 | Ten pakiet zawiera statyczną bibliotekę kliencką MongoDB. | |
7165862f | 99 | |
748739f7 ER |
100 | %package server |
101 | Summary: MongoDB server, sharding server, and support scripts | |
7165862f | 102 | Summary(pl.UTF-8): Serwer MongoDB, serwer dzielący oraz skrypty pomocnicze |
748739f7 ER |
103 | Group: Applications/Databases |
104 | Requires: %{name} = %{version}-%{release} | |
40ec6826 ER |
105 | Provides: group(mongod) |
106 | Provides: user(mongod) | |
aa21d651 | 107 | Requires(post,preun): /sbin/chkconfig |
40ec6826 ER |
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 | |
aa21d651 | 114 | Requires: rc-scripts |
748739f7 ER |
115 | |
116 | %description server | |
117 | Mongo (from "huMONGOus") is a schema-free document-oriented database. | |
118 | ||
119 | This package provides the mongo server software, mongo sharding server | |
7165862f JB |
120 | software, default configuration files, and init.d scripts. |
121 | ||
122 | %description server -l pl.UTF-8 | |
123 | Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty | |
124 | pozbawione schematu. | |
125 | ||
126 | Ten pakiet zawiera serwer mongo, serwer dzielący, pliki domyślnej | |
127 | konfiguracji oraz skrypty init.d. | |
748739f7 | 128 | |
69fbae1d | 129 | %prep |
130 | %setup -q -n %{name}-src-r%{version} | |
105f2c53 | 131 | %patch0 -p1 |
04298a8b JB |
132 | %patch1 -p1 |
133 | %patch2 -p1 | |
134 | %{__sed} -i -e 's,-O3,%{rpmcxxflags} %{rpmcppflags},' SConstruct | |
69fbae1d | 135 | |
d1b0fd13 ER |
136 | # Fix permissions |
137 | find -type f -executable | xargs chmod a-x | |
138 | ||
04298a8b JB |
139 | # force system pcre/js/snappy |
140 | %{__rm} -r third_party/{js-1.7,pcre-7.4,snappy,*.py} | |
141 | ||
69fbae1d | 142 | %build |
d1b0fd13 ER |
143 | %scons \ |
144 | --prefix=$RPM_BUILD_ROOT%{_prefix} \ | |
145 | --sharedclient \ | |
146 | --full all \ | |
75e22e92 | 147 | --usev8 \ |
148 | --cxx=%{__cxx} | |
69fbae1d | 149 | |
69fbae1d | 150 | %install |
151 | rm -rf $RPM_BUILD_ROOT | |
d1b0fd13 | 152 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \ |
748739f7 | 153 | $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \ |
d1b0fd13 | 154 | $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo |
748739f7 | 155 | |
c9011c68 | 156 | # XXX: scons is so great, recompiles everything here! |
d1b0fd13 ER |
157 | %scons install \ |
158 | --prefix=$RPM_BUILD_ROOT%{_prefix} \ | |
159 | --sharedclient \ | |
160 | --full \ | |
c9011c68 JB |
161 | --usev8 \ |
162 | --cxx=%{__cxx} | |
d1b0fd13 | 163 | |
7165862f | 164 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod |
748739f7 | 165 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod |
7165862f JB |
166 | cp -p rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod |
167 | cp -p rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf | |
168 | cp -p debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
69fbae1d | 169 | |
748739f7 | 170 | touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log |
69fbae1d | 171 | |
172 | %clean | |
69fbae1d | 173 | rm -rf $RPM_BUILD_ROOT |
174 | ||
f5624e0a JB |
175 | %post libs -p /sbin/ldconfig |
176 | %postun libs -p /sbin/ldconfig | |
177 | ||
69fbae1d | 178 | %pre server |
5688efcd | 179 | %groupadd -g 258 -r mongod |
180 | %useradd -u 258 -r -g mongod -d %{_var}/lib/mongo -s /bin/false -c "MongoDB Database Server" mongod | |
69fbae1d | 181 | |
182 | %post server | |
aa21d651 ER |
183 | /sbin/chkconfig --add mongod |
184 | %service mongod restart | |
69fbae1d | 185 | |
186 | %preun server | |
aa21d651 ER |
187 | if [ "$1" = "0" ]; then |
188 | %service -q mongod stop | |
189 | /sbin/chkconfig --del mongod | |
190 | fi | |
69fbae1d | 191 | |
5688efcd | 192 | %postun server |
40ec6826 ER |
193 | if [ "$1" = "0" ]; then |
194 | %userremove mongod | |
195 | %groupremove mongod | |
196 | fi | |
197 | ||
69fbae1d | 198 | %files |
199 | %defattr(644,root,root,755) | |
200 | %doc README GNU-AGPL-3.0.txt | |
04298a8b | 201 | %attr(755,root,root) %{_bindir}/bsondump |
69fbae1d | 202 | %attr(755,root,root) %{_bindir}/mongo |
203 | %attr(755,root,root) %{_bindir}/mongodump | |
204 | %attr(755,root,root) %{_bindir}/mongoexport | |
205 | %attr(755,root,root) %{_bindir}/mongofiles | |
206 | %attr(755,root,root) %{_bindir}/mongoimport | |
207 | %attr(755,root,root) %{_bindir}/mongorestore | |
f5624e0a | 208 | %attr(755,root,root) %{_bindir}/mongosniff |
69fbae1d | 209 | %attr(755,root,root) %{_bindir}/mongostat |
04298a8b JB |
210 | %attr(755,root,root) %{_bindir}/mongotop |
211 | %{_mandir}/man1/bsondump.1* | |
69fbae1d | 212 | %{_mandir}/man1/mongo.1* |
69fbae1d | 213 | %{_mandir}/man1/mongodump.1* |
214 | %{_mandir}/man1/mongoexport.1* | |
215 | %{_mandir}/man1/mongofiles.1* | |
216 | %{_mandir}/man1/mongoimport.1* | |
217 | %{_mandir}/man1/mongosniff.1* | |
218 | %{_mandir}/man1/mongostat.1* | |
219 | %{_mandir}/man1/mongorestore.1* | |
220 | ||
f5624e0a JB |
221 | %files libs |
222 | %defattr(644,root,root,755) | |
223 | %attr(755,root,root) %{_libdir}/libmongoclient.so | |
224 | ||
225 | %files devel | |
226 | %defattr(644,root,root,755) | |
227 | %{_includedir}/mongo | |
228 | ||
229 | %files static | |
230 | %defattr(644,root,root,755) | |
231 | %{_libdir}/libmongoclient.a | |
232 | ||
69fbae1d | 233 | %files server |
234 | %defattr(644,root,root,755) | |
748739f7 ER |
235 | %dir %{_sysconfdir} |
236 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mongod.conf | |
237 | %attr(754,root,root) /etc/rc.d/init.d/mongod | |
238 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mongod | |
69fbae1d | 239 | %config(noreplace) /etc/logrotate.d/mongod |
69fbae1d | 240 | %attr(755,root,root) %{_bindir}/mongod |
241 | %attr(755,root,root) %{_bindir}/mongos | |
f5624e0a | 242 | %{_mandir}/man1/mongod.1* |
69fbae1d | 243 | %{_mandir}/man1/mongos.1* |
244 | %attr(755,mongod,mongod) %dir %{_var}/lib/mongo | |
245 | %attr(755,mongod,mongod) %dir %{_var}/log/mongo | |
246 | %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log |