summaryrefslogtreecommitdiff
path: root/storage/mroonga/packages/rpm/centos/mariadb-mroonga.spec.in
blob: 5ed56b433b2972fedd5da563ca7eb67fd8ca1dc2 (plain)
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
%define mariadb_epoch_default   1
%define mariadb_version_default 5.5.37
%define mariadb_release_default 1
%define mariadb_dist_default    .el7_0
%define mariadb_download_base_url_default http://vault.centos.org/7.0.1406/updates/Source/SPackages
%define mariadb_spec_file_default mariadb.spec

%{!?mariadb_epoch:%define mariadb_epoch %{mariadb_epoch_default}}
%{!?mariadb_version:%define mariadb_version %{mariadb_version_default}}
%{!?mariadb_release:%define mariadb_release %{mariadb_release_default}}
%{!?mariadb_dist:%define mariadb_dist %{mariadb_dist_default}}
%{!?mariadb_download_base_url:%define mariadb_download_base_url %{mariadb_download_base_url_default}}
%{!?mariadb_spec_file:%define mariadb_spec_file %{mariadb_spec_file_default}}

%define mariadb_package_version %{mariadb_epoch}:%{mariadb_version}-%{mariadb_release}%{mariadb_dist}

%define groonga_required_version @REQUIRED_GROONGA_VERSION@

Name:		mariadb-mroonga
Version:	@VERSION@
Release:	1%{?dist}
Summary:	A fast fulltext searchable storage engine for MariaDB

Group:		Applications/Databases
License:	LGPLv2.1
URL:		http://mroonga.org/
Source0:	http://packages.groonga.org/source/mroonga/mroonga-%{version}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
BuildRequires:	groonga-devel >= %{groonga_required_version}
BuildRequires:	groonga-normalizer-mysql-devel
BuildRequires:	wget
BuildRequires:	mariadb-devel
Requires:	mariadb-server = %{mariadb_package_version}
Requires:	mariadb = %{mariadb_package_version}
Requires:	groonga-libs >= %{groonga_required_version}
Requires:	groonga-normalizer-mysql

%description
Mroonga is a fast fulltext searchable storage plugin for MariaDB.
It is based on Groonga that is a fast fulltext search engine and
column store. Groonga is good at real-time update.

%package doc
Summary:	Documentation for Mroonga
Group:		Documentation
License:	LGPLv2.1

%description doc
Documentation for Mroonga


%prep
%setup -q -n mroonga-%{version}

mariadb_full_version=%{mariadb_version}-%{mariadb_release}%{mariadb_dist}
srpm=mariadb-${mariadb_full_version}.src.rpm
if [ ! -f ../../SRPMS/$srpm ]; then
  wget --continue -O ../../SRPMS/$srpm %{mariadb_download_base_url}/$srpm
  rpm -Uvh ../../SRPMS/$srpm
  rm ../../SRPMS/$srpm
fi

%build
mariadb_source=../mariadb-%{mariadb_version}
if [ ! -d ${mariadb_source} ]; then
  rpmbuild -bc                                  \
    --define 'runselftest 0'                    \
    --define 'optflags -O0'                     \
    ../../SPECS/%{mariadb_spec_file}
fi
%configure                                      \
  --disable-static                              \
  --with-mysql-source=${mariadb_source}         \
  %{?mroonga_configure_options}
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT%{_libdir}/mysql/plugin/*.la
mv $RPM_BUILD_ROOT%{_datadir}/doc/mroonga/ mysql-mroonga-doc/

%clean
rm -rf $RPM_BUILD_ROOT

%post
if /usr/bin/mysql -u root -e "quit"; then
  password_option=""
else
  password_option="-p"
fi
current_version=0
version=$(echo %{groonga_required_version} | sed -e 's/\.//g')
required_version=$(expr $version)
version=$(/usr/bin/mysql -e "SHOW VARIABLES LIKE 'mroonga_libgroonga_version'" | \
  grep mroonga | cut -f 2 | sed -e 's/\.//g')
if [ -n "$version" ]; then
  current_version=$(expr $version)
fi
install_sql=%{_datadir}/mroonga/install.sql
uninstall_sql=%{_datadir}/mroonga/uninstall.sql

if [ "$1" = 2 ] ; then
  if [ $current_version -lt $required_version ]; then
    command="/usr/bin/mysql -u root $password_option"
    echo "run the following command after restarting MySQL server:";
    echo "  $command < ${uninstall_sql}"
    echo "  $command < ${install_sql}"
    exit 0
  else
    command="/usr/bin/mysql -u root $password_option"
    command="${command} < ${uninstall_sql}"
    echo $command
    eval $command || \
      (echo "run the following command to unregister Mroonga:"; \
       echo "  $command")
  fi
fi

command="/usr/bin/mysql -u root $password_option < ${install_sql}"
echo $command
eval $command || \
  (echo "run the following command to register Mroonga:"; \
   echo "  $command")

%preun
uninstall_sql=%{_datadir}/mroonga/uninstall.sql

if mysql -u root -e "quit"; then
  password_option=""
else
  password_option="-p"
fi
if [ "$1" = 0 ]; then
  command="/usr/bin/mysql -u root $password_option < ${uninstall_sql}"
  echo $command
  eval $command || \
    (echo "run the following command to unregister Mroonga:"; \
     echo "  $command")
fi

%files
%defattr(-,root,root,-)
%{_libdir}/mysql/plugin/
%{_datadir}/mroonga/*
%{_datadir}/man/man1/*
%{_datadir}/man/*/man1/*

%files doc
%defattr(-,root,root,-)
%doc README COPYING
%doc mysql-mroonga-doc/*

%changelog
* Fri Aug 29 2014 Kouhei Sutou <kou@clear-code.com> - 4.05-1
- new upstream release.

* Thu Aug 14 2014 Kouhei Sutou <kou@clear-code.com> - 4.04-4
- build MariaDB for libmysqlservices.a.

* Thu Aug 14 2014 Kouhei Sutou <kou@clear-code.com> - 4.04-3
- support epoch in MariaDB.

* Wed Aug 13 2014 Kouhei Sutou <kou@clear-code.com> - 4.04-2
- build against mariadb-5.5.37-1.el7_0.

* Sun Aug 10 2014 Kouhei Sutou <kou@clear-code.com> - 4.04-1
- initial packaging for CentOS 7 based on mysql-mroogna package.

* Tue Jul 29 2014 HAYASHI Kentaro <hayashi@clear-code.com> - 4.04-1
- new upstream release.

* Thu May 29 2014 Kouhei Sutou <kou@clear-code.com> - 4.03-1
- new upstream release.

* Tue Apr 29 2014 Kouhei Sutou <kou@clear-code.com> - 4.02-1
- new upstream release.

* Sat Mar 29 2014 HAYASHI Kentaro <hayashi@clear-code.com> - 4.01-1
- new upstream release.

* Thu Feb 13 2014 HAYASHI Kentaro <hayashi@clear-code.com> - 4.00-2
- use MySQL 5.1.73-3 on CentOS 6.

* Sun Feb 09 2014 HAYASHI Kentaro <hayashi@clear-code.com> - 4.00-1
- new upstream release.

* Wed Jan 29 2014 HAYASHI Kentaro <hayashi@clear-code.com> - 3.12-1
- new upstream release.

* Sun Dec 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.11-1
- new upstream release.

* Sat Dec 7 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.10-2
- use MySQL 5.1.71-1 on CentOS 6.

* Fri Nov 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.10-1
- new upstream release.

* Tue Oct 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.09-1
- new upstream release.

* Sun Sep 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.08-1
- new upstream release.
- use MySQL 5.6.14-1 on CentOS 5.

* Wed Sep 4 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.07-2
- fix a bug that mroonga is removed accidentally on upgrade #1918.
  Reported by @ceekz. Thanks!!!

* Thu Aug 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.07-1
- new upstream release.
- use MySQL 5.6.13-1 on CentOS 5.

* Mon Jul 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.06-1
- new upstream release.
- use MySQL 5.6.12-2 on CentOS 5.

* Sat Jun 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.05-1
- new upstream release.
- use MySQL 5.6.12 on CentOS 5.

* Wed May 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.04-1
- new upstream release.

* Fri May 10 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.03-2
- use MySQL 5.6.11-2 on CentOS 5. see http://bugs.mysql.com/bug.php?id=69027
  Reported by Y.Kentaro. Thanks!!!

* Mon Apr 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.03-1
- new upstream release.

* Fri Mar 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.02-0
- new upstream release.

* Thu Feb 28 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.01-0
- new upstream release.

* Sat Feb 09 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.00-0
- new upstream release.
- require groonga 3.0.0 or later

* Tue Feb 05 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 2.10-2
- use MySQL 5.1.67-1 on CentOS 6.
  Reported by wakisuke.ua. Thanks!!!

* Sat Dec 29 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.10-0
- new upstream release.

* Mon Dec 10 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.09-1
- use MySQL 5.1.66-2 on CentOS 6.
  Reported by wakisuke.ua. Thanks!!!

* Thu Nov 29 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.09-0
- new upstream release.
- use MySQL 5.5.28 on CentOS 5.
- use MySQL 5.1.66 on CentOS 6.

* Mon Oct 29 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.08-0
- new upstream release.
- add missing "DROP FUNCTION mroonga_snippet".
  Reported by @tokuhy. Thanks!!!

* Sat Sep 29 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.07-0
- new upstream release.

* Wed Aug 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.06-0
- new upstream release.
- make MySQL spec file name customizable.
- make mroonga configure options customizable.
- add missing mysql-devel BuildRequires. Reported by wing. Thanks!!!
- use MySQL 5.5.27.

* Sun Jul 29 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.05-0
- new upstream release.
- use MySQL 5.5.25a.

* Fri Jun 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.04-0
- new upstream release.
- ensure deleting mroonga plugin before install.
  Suggested by Kazuhiro Isobe. Thanks!!!
- use MySQL 5.5.25.

* Tue May 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.03-0
- new upstream release.
- use MySQL 5.5.24.
- make mysql_* variables customizable
- require groonga 2.0.3 or later.

* Sun Apr 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.02-0
- new upstream release.
- use MySQL 5.5.23.
- require groonga 2.0.2 or later.

* Thu Mar 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.01-0
- new upstream release.
- ensure plugin is uninstalled by closing all tables use mroonga.

* Wed Feb 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.00-0
- new upstream release.
- always install/uninstall plugin.
- use MySQL 5.1.61 and 5.5.21.
- require groonga 2.0.0 or later.

* Sun Jan 29 2012 Kouhei Sutou <kou@clear-code.com> - 1.20-0
- new upstream release.
- require groonga 1.3.0.
- groonga -> mroonga.
- use MySQL 5.5.20.

* Thu Dec 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.11-0
- new upstream release.

* Sat Oct 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.10-0
- new upstream release.
- groonga storage engine -> mroonga.

* Thu Sep 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.0.0-0
- new upstream release.

* Mon Aug 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.9-0
- new upstream release.

* Fri Jul 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.8-0
- new upstream release.

* Wed Jun 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.7-0
- new upstream release.

* Sun May 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.6-0
- new upstream release.

* Tue May 17 2011 Kouhei Sutou <kou@clear-code.com> - 0.5-2
- use MySQL 5.5.12.

* Tue Mar 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.5-1
- new upstream release.

* Sat Jan 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.4-4
- do not remove plugin on upgrade.

* Wed Jan 12 2011 Kouhei Sutou <kou@clear-code.com> - 0.4-3
- rebuild without debug symbol.

* Thu Dec 30 2010 Kouhei Sutou <kou@clear-code.com> - 0.4-2
- use MySQL 5.5.8-1.
- fix SQL literal notation.

* Mon Nov 29 2010 Kouhei Sutou <kou@clear-code.com> - 0.4-1
- use the latest MySQL.
- new upstream release.

* Sun Nov 21 2010 Kouhei Sutou <kou@clear-code.com> - 0.3-2
- install user define function.

* Fri Oct 29 2010 Kouhei Sutou <kou@clear-code.com> - 0.3-1
- new upstream release.

* Fri Oct 08 2010 Kouhei Sutou <kou@clear-code.com> - 0.2-2
- specify target MySQL version.
- use %{version}.

* Wed Sep 29 2010 Kouhei Sutou <kou@clear-code.com> - 0.2-1
- new upstream release.

* Sun Sep 12 2010 Kouhei Sutou <kou@clear-code.com> - 0.1-3
- require MySQL-client-community.

* Fri Sep 10 2010 Kouhei Sutou <kou@clear-code.com> - 0.1-2
- use MySQL-devel-community.

* Fri Sep 03 2010 Kouhei Sutou <kou@clear-code.com> - 0.1-1
- initial packaging for CentOS.