]>
Commit | Line | Data |
---|---|---|
f5624e0a | 1 | # TODO: pass rpmldflags, rpmcppflags |
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 |
105f2c53 | 5 | Version: 1.8.3 |
d1b0fd13 | 6 | Release: 0.1 |
69fbae1d | 7 | License: AGPL 3.0 |
8 | Group: Applications/Databases | |
1987b887 | 9 | Source0: http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz |
105f2c53 | 10 | # Source0-md5: 662e7ad6ff9f8e4d16c72c038b4a0c60 |
1987b887 | 11 | Source1: %{name}.logrotate |
12 | Source2: %{name}.init | |
105f2c53 | 13 | Patch0: config.patch |
7165862f | 14 | URL: http://www.mongodb.org/ |
69fbae1d | 15 | BuildRequires: boost-devel >= 1.42 |
f5624e0a | 16 | BuildRequires: libpcap-devel |
c5835a7a | 17 | BuildRequires: libstdc++-devel >= 6:4.0 |
1987b887 | 18 | BuildRequires: pcre-cxx-devel |
c07fcde2 | 19 | BuildRequires: pcre-devel |
69fbae1d | 20 | BuildRequires: readline-devel |
aa21d651 | 21 | BuildRequires: rpmbuild(macros) >= 1.228 |
69fbae1d | 22 | BuildRequires: scons >= 1.2 |
75e22e92 | 23 | BuildRequires: sed >= 4.0 |
69fbae1d | 24 | BuildRequires: v8-devel |
69fbae1d | 25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
69fbae1d | 26 | |
27 | %description | |
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, | |
31 | and auto-sharding. | |
32 | ||
33 | This package provides the mongo shell, import/export tools, and other | |
34 | client utilities. | |
35 | ||
7165862f JB |
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. | |
41 | ||
42 | Ten pakiet zawiera powłokę mongo, narzędzia do eksportu/importu danych | |
43 | oraz inne narzędzia klienckie. | |
44 | ||
f5624e0a JB |
45 | %package libs |
46 | Summary: MongoDB client library | |
47 | Summary(pl.UTF-8): Biblioteka kliencka MongoDB | |
48 | Group: Libraries | |
49 | ||
50 | %description libs | |
51 | Mongo (from "huMONGOus") is a schema-free document-oriented database. | |
52 | ||
53 | This package provides the mongo client library. | |
54 | ||
55 | %description libs -l pl.UTF-8 | |
56 | Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty | |
57 | pozbawione schematu. | |
58 | ||
59 | Ten pakiet zawiera bibliotekę kliencką mongo. | |
60 | ||
69fbae1d | 61 | %package devel |
f5624e0a JB |
62 | Summary: Header files for MongoDB client library |
63 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej MongoDB | |
69fbae1d | 64 | Group: Development/Libraries |
f5624e0a | 65 | Requires: %{name}-libs = %{version}-%{release} |
69fbae1d | 66 | |
67 | %description devel | |
68 | Mongo (from "huMONGOus") is a schema-free document-oriented database. | |
69 | ||
f5624e0a JB |
70 | This package provides the header files needed to develop MongoDB |
71 | client software. | |
69fbae1d | 72 | |
7165862f JB |
73 | %description devel -l pl.UTF-8 |
74 | Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty | |
75 | pozbawione schematu. | |
76 | ||
f5624e0a JB |
77 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia |
78 | oprogramowania klienckiego dla MongoDB. | |
79 | ||
80 | %package static | |
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} | |
85 | ||
86 | %description static | |
87 | Mongo (from "huMONGOus") is a schema-free document-oriented database. | |
88 | ||
89 | This package provides the MongoDB static client library. | |
90 | ||
91 | %description static -l pl.UTF-8 | |
92 | Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty | |
93 | pozbawione schematu. | |
94 | ||
95 | Ten pakiet zawiera statyczną bibliotekę kliencką MongoDB. | |
7165862f | 96 | |
748739f7 ER |
97 | %package server |
98 | Summary: MongoDB server, sharding server, and support scripts | |
7165862f | 99 | Summary(pl.UTF-8): Serwer MongoDB, serwer dzielący oraz skrypty pomocnicze |
748739f7 ER |
100 | Group: Applications/Databases |
101 | Requires: %{name} = %{version}-%{release} | |
40ec6826 ER |
102 | Provides: group(mongod) |
103 | Provides: user(mongod) | |
aa21d651 | 104 | Requires(post,preun): /sbin/chkconfig |
40ec6826 ER |
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 | |
aa21d651 | 111 | Requires: rc-scripts |
748739f7 ER |
112 | |
113 | %description server | |
114 | Mongo (from "huMONGOus") is a schema-free document-oriented database. | |
115 | ||
116 | This package provides the mongo server software, mongo sharding server | |
7165862f JB |
117 | software, default configuration files, and init.d scripts. |
118 | ||
119 | %description server -l pl.UTF-8 | |
120 | Mongo (od "huMONGOus") to baza danych zorientowana na dokumenty | |
121 | pozbawione schematu. | |
122 | ||
123 | Ten pakiet zawiera serwer mongo, serwer dzielący, pliki domyślnej | |
124 | konfiguracji oraz skrypty init.d. | |
748739f7 | 125 | |
69fbae1d | 126 | %prep |
127 | %setup -q -n %{name}-src-r%{version} | |
105f2c53 | 128 | %patch0 -p1 |
7165862f | 129 | %{__sed} -i 's,-O3,%{rpmcxxflags},;/,\.\.\/v8/d' SConstruct |
69fbae1d | 130 | |
d1b0fd13 ER |
131 | # Fix permissions |
132 | find -type f -executable | xargs chmod a-x | |
133 | ||
69fbae1d | 134 | %build |
d1b0fd13 ER |
135 | %scons \ |
136 | --prefix=$RPM_BUILD_ROOT%{_prefix} \ | |
137 | --sharedclient \ | |
138 | --full all \ | |
75e22e92 | 139 | --usev8 \ |
140 | --cxx=%{__cxx} | |
69fbae1d | 141 | |
69fbae1d | 142 | # XXX really should have shared library here |
143 | ||
144 | %install | |
145 | rm -rf $RPM_BUILD_ROOT | |
d1b0fd13 | 146 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \ |
748739f7 | 147 | $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \ |
d1b0fd13 | 148 | $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo |
748739f7 | 149 | |
d1b0fd13 ER |
150 | %scons install \ |
151 | --prefix=$RPM_BUILD_ROOT%{_prefix} \ | |
152 | --sharedclient \ | |
153 | --full \ | |
154 | --usev8 | |
155 | ||
7165862f | 156 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod |
748739f7 | 157 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod |
7165862f JB |
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 | |
69fbae1d | 161 | |
748739f7 | 162 | touch $RPM_BUILD_ROOT%{_var}/log/mongo/mongod.log |
69fbae1d | 163 | |
164 | %clean | |
69fbae1d | 165 | rm -rf $RPM_BUILD_ROOT |
166 | ||
f5624e0a JB |
167 | %post libs -p /sbin/ldconfig |
168 | %postun libs -p /sbin/ldconfig | |
169 | ||
69fbae1d | 170 | %pre server |
5688efcd | 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 | |
69fbae1d | 173 | |
174 | %post server | |
aa21d651 ER |
175 | /sbin/chkconfig --add mongod |
176 | %service mongod restart | |
69fbae1d | 177 | |
178 | %preun server | |
aa21d651 ER |
179 | if [ "$1" = "0" ]; then |
180 | %service -q mongod stop | |
181 | /sbin/chkconfig --del mongod | |
182 | fi | |
69fbae1d | 183 | |
5688efcd | 184 | %postun server |
40ec6826 ER |
185 | if [ "$1" = "0" ]; then |
186 | %userremove mongod | |
187 | %groupremove mongod | |
188 | fi | |
189 | ||
69fbae1d | 190 | %files |
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 | |
f5624e0a | 199 | %attr(755,root,root) %{_bindir}/mongosniff |
69fbae1d | 200 | %attr(755,root,root) %{_bindir}/mongostat |
201 | %attr(755,root,root) %{_bindir}/bsondump | |
202 | %{_mandir}/man1/mongo.1* | |
69fbae1d | 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* | |
210 | ||
f5624e0a JB |
211 | %files libs |
212 | %defattr(644,root,root,755) | |
213 | %attr(755,root,root) %{_libdir}/libmongoclient.so | |
214 | ||
215 | %files devel | |
216 | %defattr(644,root,root,755) | |
217 | %{_includedir}/mongo | |
218 | ||
219 | %files static | |
220 | %defattr(644,root,root,755) | |
221 | %{_libdir}/libmongoclient.a | |
222 | ||
69fbae1d | 223 | %files server |
224 | %defattr(644,root,root,755) | |
748739f7 ER |
225 | %dir %{_sysconfdir} |
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 | |
69fbae1d | 229 | %config(noreplace) /etc/logrotate.d/mongod |
69fbae1d | 230 | %attr(755,root,root) %{_bindir}/mongod |
231 | %attr(755,root,root) %{_bindir}/mongos | |
f5624e0a | 232 | %{_mandir}/man1/mongod.1* |
69fbae1d | 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 |