1 | %{!?use_lzo:%define use_lzo 0} |
---|
2 | |
---|
3 | %global _initddir %{_sysconfdir}/init.d/ |
---|
4 | |
---|
5 | Name: groonga |
---|
6 | Version: 2.0.6 |
---|
7 | Release: 1%{?_dist_release} |
---|
8 | Summary: An Embeddable Fulltext Search Engine |
---|
9 | |
---|
10 | Group: Applications/Text |
---|
11 | License: LGPLv2 |
---|
12 | URL: http://groonga.org/ |
---|
13 | Source0: http://packages.groonga.org/source/groonga/groonga-%{version}.tar.gz |
---|
14 | |
---|
15 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) |
---|
16 | BuildRequires: mecab-devel |
---|
17 | BuildRequires: zlib-devel |
---|
18 | %if %{use_lzo} |
---|
19 | BuildRequires: lzo-devel |
---|
20 | %endif |
---|
21 | BuildRequires: pcre-devel |
---|
22 | Requires: %{name}-libs = %{version}-%{release} |
---|
23 | Requires: %{name}-plugin-suggest = %{version}-%{release} |
---|
24 | |
---|
25 | Vendor: Project Vine |
---|
26 | Distribution: Vine Linux |
---|
27 | Packager: tomop |
---|
28 | |
---|
29 | %description |
---|
30 | Groonga is an embeddable full-text search engine library. It can |
---|
31 | integrate with DBMS and scripting languages to enhance their search |
---|
32 | functionality. It also provides a standalone data store server based |
---|
33 | on relational data model. |
---|
34 | |
---|
35 | %package libs |
---|
36 | Summary: Runtime libraries for groonga |
---|
37 | Group: System Environment/Libraries |
---|
38 | License: LGPLv2 and (MIT or GPLv2) |
---|
39 | Requires: zlib |
---|
40 | %if %{use_lzo} |
---|
41 | Requires: lzo |
---|
42 | %endif |
---|
43 | Requires(post): /sbin/ldconfig |
---|
44 | Requires(postun): /sbin/ldconfig |
---|
45 | |
---|
46 | %description libs |
---|
47 | This package contains the libraries for groonga |
---|
48 | |
---|
49 | %package server-common |
---|
50 | Summary: Common packages for the groonga server and the groonga HTTP server |
---|
51 | Group: Applications/Text |
---|
52 | License: LGPLv2 |
---|
53 | Requires: %{name} = %{version}-%{release} |
---|
54 | Requires(pre): shadow-utils |
---|
55 | |
---|
56 | %description server-common |
---|
57 | This package provides common settings for server use |
---|
58 | |
---|
59 | %package server |
---|
60 | Summary: Groonga server |
---|
61 | Group: Applications/Text |
---|
62 | License: LGPLv2 and (MIT or GPLv2) |
---|
63 | Requires: %{name}-server-common = %{version}-%{release} |
---|
64 | Requires: curl |
---|
65 | Requires(pre): shadow-utils |
---|
66 | Requires(post): /sbin/chkconfig |
---|
67 | Requires(preun): /sbin/chkconfig |
---|
68 | Requires(preun): /sbin/service |
---|
69 | Requires(postun): /sbin/service |
---|
70 | Obsoletes: %{name} < 1.2.2-0 |
---|
71 | Obsoletes: %{name}-server < 2.0.6-0 |
---|
72 | |
---|
73 | %description server |
---|
74 | This package contains the groonga server |
---|
75 | |
---|
76 | %package httpd |
---|
77 | Summary: Groonga HTTP server |
---|
78 | Group: Applications/Text |
---|
79 | License: LGPLv2 and BSD |
---|
80 | Requires: %{name}-server-common = %{version}-%{release} |
---|
81 | Requires: pcre |
---|
82 | Obsoletes: %{name}-httpd < 2.0.6-0 |
---|
83 | |
---|
84 | %description httpd |
---|
85 | This package contains the groonga HTTP server |
---|
86 | |
---|
87 | %package doc |
---|
88 | Summary: Documentation for groonga |
---|
89 | Group: Documentation |
---|
90 | License: LGPLv2 and BSD |
---|
91 | |
---|
92 | %description doc |
---|
93 | Documentation for groonga |
---|
94 | |
---|
95 | %package devel |
---|
96 | Summary: Libraries and header files for groonga |
---|
97 | Group: Development/Libraries |
---|
98 | Requires: %{name}-libs = %{version}-%{release} |
---|
99 | |
---|
100 | %description devel |
---|
101 | Libraries and header files for groonga |
---|
102 | |
---|
103 | %package tokenizer-mecab |
---|
104 | Summary: MeCab tokenizer for groonga |
---|
105 | Group: Applications/Text |
---|
106 | Requires: %{name}-libs = %{version}-%{release} |
---|
107 | Requires: mecab |
---|
108 | |
---|
109 | %description tokenizer-mecab |
---|
110 | MeCab tokenizer for groonga |
---|
111 | |
---|
112 | %package plugin-suggest |
---|
113 | Summary: Suggest plugin for groonga |
---|
114 | Group: Applications/Text |
---|
115 | Requires: %{name}-libs = %{version}-%{release} |
---|
116 | #Requires: messagepack |
---|
117 | #Requires: zeromq |
---|
118 | #Requires: libevent |
---|
119 | |
---|
120 | %description plugin-suggest |
---|
121 | Sugget plugin for groonga |
---|
122 | |
---|
123 | %package munin-plugins |
---|
124 | Summary: Munin plugins for groonga |
---|
125 | Group: Applications/System |
---|
126 | Requires: %{name}-libs = %{version}-%{release} |
---|
127 | Requires: munin-node |
---|
128 | Requires(post): munin-node |
---|
129 | Requires(post): /sbin/service |
---|
130 | Requires(postun): /sbin/service |
---|
131 | |
---|
132 | %description munin-plugins |
---|
133 | Munin plugins for groonga |
---|
134 | |
---|
135 | %prep |
---|
136 | #% define optflags -O0 |
---|
137 | %setup -q |
---|
138 | |
---|
139 | |
---|
140 | %build |
---|
141 | %configure \ |
---|
142 | --disable-static \ |
---|
143 | --with-package-platform=redhat \ |
---|
144 | --with-zlib \ |
---|
145 | %if %{use_lzo} |
---|
146 | --with-lzo \ |
---|
147 | %endif |
---|
148 | --with-munin-plugins |
---|
149 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool |
---|
150 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool |
---|
151 | make %{?_smp_mflags} |
---|
152 | |
---|
153 | |
---|
154 | %install |
---|
155 | rm -rf $RPM_BUILD_ROOT |
---|
156 | make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" |
---|
157 | rm $RPM_BUILD_ROOT%{_libdir}/groonga/plugins/*/*.la |
---|
158 | rm $RPM_BUILD_ROOT%{_libdir}/*.la |
---|
159 | |
---|
160 | mv $RPM_BUILD_ROOT%{_datadir}/doc/groonga groonga-doc |
---|
161 | |
---|
162 | mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/groonga |
---|
163 | mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/groonga/db |
---|
164 | mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/groonga |
---|
165 | |
---|
166 | mv $RPM_BUILD_ROOT%{_datadir}/groonga/munin/ $RPM_BUILD_ROOT%{_datadir}/ |
---|
167 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/munin/plugin-conf.d/ |
---|
168 | cat <<EOC > $RPM_BUILD_ROOT%{_sysconfdir}/munin/plugin-conf.d/groonga |
---|
169 | [groonga_*] |
---|
170 | user groonga |
---|
171 | group groonga |
---|
172 | env.PATH %{_bindir} |
---|
173 | env.pid_file %{_localstatedir}/run/groonga/groonga.pid |
---|
174 | env.path %{_localstatedir}/lib/groonga/db/db |
---|
175 | env.host 127.0.0.1 |
---|
176 | env.port 10041 |
---|
177 | env.log_path %{_localstatedir}/log/groonga/query.log |
---|
178 | EOC |
---|
179 | |
---|
180 | %clean |
---|
181 | rm -rf $RPM_BUILD_ROOT |
---|
182 | |
---|
183 | %pre server-common |
---|
184 | getent group groonga >/dev/null || groupadd -r groonga |
---|
185 | getent passwd groonga >/dev/null || \ |
---|
186 | useradd -r -g groonga -d %{_localstatedir}/lib/groonga -s /sbin/nologin \ |
---|
187 | -c 'groonga' groonga |
---|
188 | exit 0 |
---|
189 | |
---|
190 | %post server |
---|
191 | /sbin/chkconfig --add groonga |
---|
192 | |
---|
193 | %post libs |
---|
194 | /sbin/ldconfig |
---|
195 | |
---|
196 | %post munin-plugins |
---|
197 | %{_sbindir}/munin-node-configure --shell --remove-also | grep -e 'groonga_' | sh |
---|
198 | [ -f %{_localstatedir}/lock/subsys/munin-node ] && \ |
---|
199 | /sbin/service munin-node restart > /dev/null 2>&1 |
---|
200 | : |
---|
201 | |
---|
202 | %preun server |
---|
203 | if [ $1 = 0 ] ; then |
---|
204 | /sbin/service groonga stop >/dev/null 2>&1 || : |
---|
205 | /sbin/chkconfig --del groonga |
---|
206 | fi |
---|
207 | |
---|
208 | %postun server |
---|
209 | if [ $1 -ge 1 ] ; then |
---|
210 | /sbin/service groonga condrestart >/dev/null 2>&1 || : |
---|
211 | fi |
---|
212 | |
---|
213 | %postun libs |
---|
214 | /sbin/ldconfig |
---|
215 | |
---|
216 | %postun munin-plugins |
---|
217 | if [ $1 -eq 0 ]; then |
---|
218 | [ -f %{_localstatedir}/lock/subsys/munin-node ] && \ |
---|
219 | /sbin/service munin-node restart >/dev/null 2>&1 |
---|
220 | : |
---|
221 | fi |
---|
222 | |
---|
223 | |
---|
224 | %files |
---|
225 | %defattr(-,root,root,-) |
---|
226 | %{_datadir}/man/man1/* |
---|
227 | %{_datadir}/man/*/man1/* |
---|
228 | %{_bindir}/groonga |
---|
229 | %{_bindir}/groonga-benchmark |
---|
230 | |
---|
231 | %files libs |
---|
232 | %defattr(-,root,root,-) |
---|
233 | %doc README AUTHORS COPYING |
---|
234 | %{_libdir}/*.so.* |
---|
235 | %dir %{_libdir}/groonga |
---|
236 | %dir %{_libdir}/groonga/plugins |
---|
237 | %dir %{_libdir}/groonga/plugins/tokenizers |
---|
238 | %{_libdir}/groonga/plugins/table/table.so |
---|
239 | %{_datadir}/groonga/ |
---|
240 | |
---|
241 | %files server-common |
---|
242 | |
---|
243 | %files server |
---|
244 | %defattr(-,root,root,-) |
---|
245 | %config(noreplace) %{_sysconfdir}/groonga/ |
---|
246 | %config(noreplace) %{_sysconfdir}/sysconfig/groonga |
---|
247 | %{_initddir}/* |
---|
248 | %ghost %dir %{_localstatedir}/run/%{name} |
---|
249 | %attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name} |
---|
250 | %attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}/db |
---|
251 | |
---|
252 | %files httpd |
---|
253 | %defattr(-,root,root,-) |
---|
254 | %config(noreplace) %{_sysconfdir}/groonga/httpd/* |
---|
255 | %{_sbindir}/groonga-httpd |
---|
256 | |
---|
257 | %files doc |
---|
258 | %defattr(-,root,root,-) |
---|
259 | %doc README AUTHORS COPYING |
---|
260 | %doc groonga-doc/* |
---|
261 | |
---|
262 | %files devel |
---|
263 | %defattr(-,root,root,-) |
---|
264 | %{_includedir}/groonga/ |
---|
265 | %{_libdir}/*.so |
---|
266 | %{_libdir}/pkgconfig/groonga*.pc |
---|
267 | |
---|
268 | %files plugin-suggest |
---|
269 | %defattr(-,root,root,-) |
---|
270 | %{_bindir}/groonga-suggest-* |
---|
271 | %dir %{_libdir}/groonga/plugins |
---|
272 | %{_libdir}/groonga/plugins/suggest/suggest.so |
---|
273 | |
---|
274 | %files tokenizer-mecab |
---|
275 | %defattr(-,root,root,-) |
---|
276 | %{_libdir}/groonga/plugins/tokenizers/mecab.so |
---|
277 | |
---|
278 | %files munin-plugins |
---|
279 | %defattr(-,root,root,-) |
---|
280 | %{_datadir}/munin/plugins/* |
---|
281 | %config(noreplace) %{_sysconfdir}/munin/plugin-conf.d/* |
---|
282 | |
---|
283 | %changelog |
---|
284 | * Sat Sep 15 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.6-1 |
---|
285 | - initial build for Vine Linux. |
---|
286 | |
---|
287 | * Wed Aug 29 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.0.6-0 |
---|
288 | - new upstream release. |
---|
289 | |
---|
290 | * Sun Jul 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.5-0 |
---|
291 | - new upstream release. |
---|
292 | - split groonga-httpd related files into groonga-httpd package. |
---|
293 | |
---|
294 | * Fri Jun 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.4-0 |
---|
295 | - new upstream release. |
---|
296 | - groonga package does not require groonga-tokenizer-mecab package. |
---|
297 | |
---|
298 | * Tue May 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.3-0 |
---|
299 | - new upstream release. |
---|
300 | |
---|
301 | * Sun Apr 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.2-0 |
---|
302 | - new upstream release. |
---|
303 | |
---|
304 | * Fri Mar 30 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.1-2 |
---|
305 | - Use shutdown command for stop. |
---|
306 | |
---|
307 | * Fri Mar 30 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.1-1 |
---|
308 | - Fix bind address argument parameter. |
---|
309 | Patch by Masaharu IWAI. Thanks!!! |
---|
310 | |
---|
311 | * Thu Mar 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.1-0 |
---|
312 | - new upstream release. |
---|
313 | - grntest -> groonga-benchmark. |
---|
314 | - remove groong-tools package. |
---|
315 | |
---|
316 | * Wed Feb 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.0-0 |
---|
317 | - new upstream release. |
---|
318 | - remove other permission from DB directory. |
---|
319 | - install init.d related files directly. |
---|
320 | - use HTTP as the default protocol. |
---|
321 | |
---|
322 | * Sun Jan 29 2012 Kouhei Sutou <kou@clear-code.com> - 1.3.0-0 |
---|
323 | - new upstream release. |
---|
324 | - groonga-server package does not require groonga-munin-plugins package. |
---|
325 | suggested by Masaharu IWAI. Thanks!!! |
---|
326 | - groonga package does not require groonga-doc package. |
---|
327 | suggested by Masaharu IWAI. Thanks!!! |
---|
328 | |
---|
329 | * Thu Dec 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.9-0 |
---|
330 | - new upstream release. |
---|
331 | |
---|
332 | * Tue Nov 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.8-0 |
---|
333 | - new upstream release. |
---|
334 | - enable zlib support. |
---|
335 | - enable lzo support. |
---|
336 | - add --with-package-platform=redhat configure option to install init script. |
---|
337 | - add --with-munin-plugins cofnigure option to install Munin plugins. |
---|
338 | |
---|
339 | * Sat Oct 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.7-0 |
---|
340 | - new upstream release. |
---|
341 | |
---|
342 | * Thu Sep 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.6-0 |
---|
343 | - new upstream release. |
---|
344 | |
---|
345 | * Mon Aug 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.5-0 |
---|
346 | - new upstream release. |
---|
347 | |
---|
348 | * Fri Jul 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.4-0 |
---|
349 | - new upstream release. |
---|
350 | |
---|
351 | * Wed Jun 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.3-0 |
---|
352 | - new upstream release. |
---|
353 | - add a new groong-tools package. |
---|
354 | |
---|
355 | * Sun May 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.2-0 |
---|
356 | - new upstream release. |
---|
357 | - split server files into groonga-server package. |
---|
358 | |
---|
359 | * Fri Apr 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.1-0 |
---|
360 | - new upstream release. |
---|
361 | |
---|
362 | * Tue Mar 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.0-0 |
---|
363 | - new upstream release. |
---|
364 | |
---|
365 | * Wed Feb 09 2011 Kouhei Sutou <kou@clear-code.com> - 1.1.0-0 |
---|
366 | - new upstream release. |
---|
367 | |
---|
368 | * Wed Feb 02 2011 Kouhei Sutou <kou@clear-code.com> - 1.0.8-0 |
---|
369 | - new upstream release. |
---|
370 | |
---|
371 | * Sat Jan 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.0.7-0 |
---|
372 | - new upstream release. |
---|
373 | |
---|
374 | * Fri Dec 31 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.6-0 |
---|
375 | - new upstream release |
---|
376 | |
---|
377 | * Wed Dec 29 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.5-0 |
---|
378 | - new upstream release. |
---|
379 | |
---|
380 | * Mon Nov 29 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.4-1 |
---|
381 | - new upstream release |
---|
382 | |
---|
383 | * Wed Nov 24 2010 Daiki Ueno <dueno@redhat.com> - 1.0.3-2 |
---|
384 | - %%ghost /var/run/*. |
---|
385 | |
---|
386 | * Fri Oct 29 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.3-1 |
---|
387 | - new upstream release. |
---|
388 | |
---|
389 | * Thu Oct 09 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.2-2 |
---|
390 | - merge Fedora changes. |
---|
391 | |
---|
392 | * Thu Sep 09 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.2-1 |
---|
393 | - new upstream release. |
---|
394 | |
---|
395 | * Mon Sep 06 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.1-1 |
---|
396 | - new upstream release. |
---|
397 | |
---|
398 | * Thu Sep 02 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.0-1 |
---|
399 | - split packages. |
---|
400 | |
---|
401 | * Tue Aug 24 2010 Daiki Ueno <dueno@redhat.com> - 0.7.6-1 |
---|
402 | - initial packaging for Fedora |
---|