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