[6815] | 1 | %{!?use_system_mysql:%define use_system_mysql 0} |
---|
| 2 | |
---|
| 3 | %define mysql_base_version %{__mysql_base_version} |
---|
| 4 | %define mysql_version %{__mysql_version} |
---|
| 5 | %define mysql_release %{__mysql_release} |
---|
| 6 | |
---|
[7514] | 7 | %define groonga_required_version 3.0.0 |
---|
[6815] | 8 | |
---|
| 9 | Name: MySQL-mroonga |
---|
[7514] | 10 | Version: 3.00 |
---|
[6815] | 11 | Release: 1%{?_dist_release} |
---|
| 12 | Summary: A fast fulltext searchable storage engine for MySQL. |
---|
| 13 | |
---|
| 14 | Group: Applications/Databases |
---|
| 15 | License: LGPLv2.1 |
---|
| 16 | URL: http://mroonga.github.com/ |
---|
| 17 | Source0: http://github.com/downloads/mroonga/mroonga/mroonga-%{version}.tar.gz |
---|
| 18 | |
---|
| 19 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) |
---|
| 20 | BuildRequires: groonga-devel >= %{groonga_required_version} |
---|
| 21 | BuildRequires: MySQL-source |
---|
| 22 | %if "%{?mysql_version}" != "" |
---|
| 23 | Requires: mysqlserver-%{mysql_base_version} |
---|
| 24 | Requires: mysqlclient-%{mysql_base_version} |
---|
| 25 | %endif |
---|
| 26 | Requires: groonga-libs >= %{groonga_required_version} |
---|
| 27 | |
---|
| 28 | Vendor: Project Vine |
---|
| 29 | Distribution: Vine Linux |
---|
| 30 | Packager: tomop |
---|
| 31 | |
---|
| 32 | %description |
---|
| 33 | Mroonga is a fast fulltext searchable storage plugin for MySQL. |
---|
| 34 | It is based on groonga that is a fast fulltext search engine and |
---|
| 35 | column store. Groonga is good at real-time update. |
---|
| 36 | |
---|
| 37 | %package doc |
---|
| 38 | Summary: Documentation for mroonga |
---|
| 39 | Group: Documentation |
---|
| 40 | License: LGPLv2.1 |
---|
| 41 | |
---|
| 42 | %description doc |
---|
| 43 | Documentation for mroonga |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | %prep |
---|
| 47 | %setup -q -n mroonga-%{version} |
---|
| 48 | |
---|
| 49 | %build |
---|
| 50 | mysql_source=%{_datadir}/MySQL-source/mysql-%{mysql_version} |
---|
| 51 | %configure --disable-static --with-mysql-source=${mysql_source} \ |
---|
| 52 | %{?mroonga_configure_options} |
---|
| 53 | make %{?_smp_mflags} |
---|
| 54 | |
---|
| 55 | |
---|
| 56 | %install |
---|
| 57 | rm -rf $RPM_BUILD_ROOT |
---|
| 58 | make install DESTDIR=$RPM_BUILD_ROOT |
---|
| 59 | rm $RPM_BUILD_ROOT%{_libdir}/mysql/plugin/*.la |
---|
| 60 | rm $RPM_BUILD_ROOT%{_libdir}/mysql/plugin/*groonga* |
---|
| 61 | mv $RPM_BUILD_ROOT%{_datadir}/doc/mroonga/ mysql-mroonga-doc/ |
---|
| 62 | |
---|
| 63 | %clean |
---|
| 64 | rm -rf $RPM_BUILD_ROOT |
---|
| 65 | |
---|
| 66 | %post |
---|
| 67 | if [ "$1" = 2 ] ; then |
---|
| 68 | sql=" |
---|
| 69 | DROP FUNCTION last_insert_grn_id; |
---|
| 70 | UNINSTALL PLUGIN mroonga; |
---|
| 71 | FLUSH TABLES; |
---|
| 72 | " |
---|
| 73 | command="/usr/bin/mysql -u root -e \"$sql\"" |
---|
| 74 | echo $command |
---|
| 75 | eval $command || \ |
---|
| 76 | (echo "run the following command to unregister mroonga:"; \ |
---|
| 77 | echo " $command") |
---|
| 78 | fi |
---|
| 79 | sql=" |
---|
| 80 | DELETE IGNORE FROM mysql.plugin WHERE name = 'mroonga'; |
---|
| 81 | INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so'; |
---|
| 82 | CREATE FUNCTION last_insert_grn_id RETURNS INTEGER soname 'ha_mroonga.so'; |
---|
| 83 | " |
---|
| 84 | command="/usr/bin/mysql -u root -e \"$sql\"" |
---|
| 85 | echo $command |
---|
| 86 | eval $command || \ |
---|
| 87 | (echo "run the following command to register mroonga:"; \ |
---|
| 88 | echo " $command") |
---|
| 89 | |
---|
| 90 | %preun |
---|
| 91 | if [ "$1" = 0 ]; then |
---|
| 92 | sql=" |
---|
| 93 | DROP FUNCTION last_insert_grn_id; |
---|
| 94 | UNINSTALL PLUGIN mroonga; |
---|
| 95 | FLUSH TABLES; |
---|
| 96 | " |
---|
| 97 | command="/usr/bin/mysql -u root -e \"$sql\"" |
---|
| 98 | echo $command |
---|
| 99 | eval $command || \ |
---|
| 100 | (echo "run the following command to unregister mroonga:"; \ |
---|
| 101 | echo " $command") |
---|
| 102 | fi |
---|
| 103 | |
---|
| 104 | %files |
---|
| 105 | %defattr(-,root,root,-) |
---|
| 106 | %{_libdir}/mysql/plugin/ |
---|
| 107 | %{_datadir}/man/man1/* |
---|
| 108 | %{_datadir}/man/*/man1/* |
---|
| 109 | |
---|
| 110 | %files doc |
---|
| 111 | %defattr(-,root,root,-) |
---|
| 112 | %doc README COPYING |
---|
| 113 | %doc mysql-mroonga-doc/* |
---|
| 114 | |
---|
| 115 | %changelog |
---|
[7514] | 116 | * Wed Feb 20 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.00-1 |
---|
| 117 | - new upstream release. |
---|
| 118 | - fixed dates of old %%changelog. |
---|
| 119 | |
---|
[7160] | 120 | * Fri Nov 16 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.08-1 |
---|
| 121 | - new upstream release. |
---|
| 122 | |
---|
[6815] | 123 | * Sat Sep 15 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.06-1 |
---|
| 124 | - initial build for Vine Linux. |
---|
| 125 | |
---|
| 126 | * Wed Aug 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.06-0 |
---|
| 127 | - new upstream release. |
---|
| 128 | - make MySQL spec file name customizable. |
---|
| 129 | - make mroonga configure options customizable. |
---|
| 130 | - add missing mysql-devel BuildRequires. Reported by wing. Thanks!!! |
---|
| 131 | - use MySQL 5.5.27. |
---|
| 132 | |
---|
| 133 | * Sun Jul 29 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.05-0 |
---|
| 134 | - new upstream release. |
---|
| 135 | - use MySQL 5.5.25a. |
---|
| 136 | |
---|
| 137 | * Fri Jun 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.04-0 |
---|
| 138 | - new upstream release. |
---|
| 139 | - ensure deleting mroonga plugin before install. |
---|
| 140 | Suggested by Kazuhiro Isobe. Thanks!!! |
---|
| 141 | - use MySQL 5.5.25. |
---|
| 142 | |
---|
| 143 | * Tue May 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.03-0 |
---|
| 144 | - new upstream release. |
---|
| 145 | - use MySQL 5.5.24. |
---|
| 146 | - make mysql_* variables customizable |
---|
| 147 | - require groonga 2.0.3 or later. |
---|
| 148 | |
---|
| 149 | * Sun Apr 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.02-0 |
---|
| 150 | - new upstream release. |
---|
| 151 | - use MySQL 5.5.23. |
---|
| 152 | - require groonga 2.0.2 or later. |
---|
| 153 | |
---|
| 154 | * Thu Mar 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.01-0 |
---|
| 155 | - new upstream release. |
---|
| 156 | - ensure plugin is uninstalled by closing all tables use mroonga. |
---|
| 157 | |
---|
| 158 | * Wed Feb 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.00-0 |
---|
| 159 | - new upstream release. |
---|
| 160 | - always install/uninstall plugin. |
---|
| 161 | - use MySQL 5.1.61 and 5.5.21. |
---|
| 162 | - require groonga 2.0.0 or later. |
---|
| 163 | |
---|
| 164 | * Sun Jan 29 2012 Kouhei Sutou <kou@clear-code.com> - 1.20-0 |
---|
| 165 | - new upstream release. |
---|
| 166 | - require groonga 1.3.0. |
---|
| 167 | - groonga -> mroonga. |
---|
| 168 | - use MySQL 5.5.20. |
---|
| 169 | |
---|
| 170 | * Thu Dec 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.11-0 |
---|
| 171 | - new upstream release. |
---|
| 172 | |
---|
| 173 | * Sat Oct 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.10-0 |
---|
| 174 | - new upstream release. |
---|
| 175 | - groonga storage engine -> mroonga. |
---|
| 176 | |
---|
| 177 | * Thu Sep 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.0.0-0 |
---|
| 178 | - new upstream release. |
---|
| 179 | |
---|
| 180 | * Mon Aug 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.9-0 |
---|
| 181 | - new upstream release. |
---|
| 182 | |
---|
| 183 | * Fri Jul 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.8-0 |
---|
| 184 | - new upstream release. |
---|
| 185 | |
---|
| 186 | * Wed Jun 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.7-0 |
---|
| 187 | - new upstream release. |
---|
| 188 | |
---|
| 189 | * Sun May 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.6-0 |
---|
| 190 | - new upstream release. |
---|
| 191 | |
---|
[7514] | 192 | * Tue May 17 2011 Kouhei Sutou <kou@clear-code.com> - 0.5-2 |
---|
[6815] | 193 | - use MySQL 5.5.12. |
---|
| 194 | |
---|
[7514] | 195 | * Tue Mar 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.5-1 |
---|
[6815] | 196 | - new upstream release. |
---|
| 197 | |
---|
| 198 | * Sat Jan 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.4-4 |
---|
| 199 | - do not remove plugin on upgrade. |
---|
| 200 | |
---|
| 201 | * Wed Jan 12 2011 Kouhei Sutou <kou@clear-code.com> - 0.4-3 |
---|
| 202 | - rebuild without debug symbol. |
---|
| 203 | |
---|
| 204 | * Thu Dec 30 2010 Kouhei Sutou <kou@clear-code.com> - 0.4-2 |
---|
| 205 | - use MySQL 5.5.8-1. |
---|
| 206 | - fix SQL literal notation. |
---|
| 207 | |
---|
| 208 | * Mon Nov 29 2010 Kouhei Sutou <kou@clear-code.com> - 0.4-1 |
---|
| 209 | - use the latest MySQL. |
---|
| 210 | - new upstream release. |
---|
| 211 | |
---|
| 212 | * Sun Nov 21 2010 Kouhei Sutou <kou@clear-code.com> - 0.3-2 |
---|
| 213 | - install user define function. |
---|
| 214 | |
---|
| 215 | * Fri Oct 29 2010 Kouhei Sutou <kou@clear-code.com> - 0.3-1 |
---|
| 216 | - new upstream release. |
---|
| 217 | |
---|
| 218 | * Fri Oct 08 2010 Kouhei Sutou <kou@clear-code.com> - 0.2-2 |
---|
| 219 | - specify target MySQL version. |
---|
| 220 | - use %{version}. |
---|
| 221 | |
---|
| 222 | * Wed Sep 29 2010 Kouhei Sutou <kou@clear-code.com> - 0.2-1 |
---|
| 223 | - new upstream release. |
---|
| 224 | |
---|
[7514] | 225 | * Sun Sep 12 2010 Kouhei Sutou <kou@clear-code.com> - 0.1-3 |
---|
[6815] | 226 | - require MySQL-client-community. |
---|
| 227 | |
---|
| 228 | * Fri Sep 10 2010 Kouhei Sutou <kou@clear-code.com> - 0.1-2 |
---|
| 229 | - use MySQL-devel-community. |
---|
| 230 | |
---|
| 231 | * Fri Sep 03 2010 Kouhei Sutou <kou@clear-code.com> - 0.1-1 |
---|
| 232 | - initial packaging for CentOS. |
---|