mariadb-mroonga-vl.spec 7.1 KB

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