MySQL-mroonga-vl.spec 6.3 KB

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