MySQL-mroonga-vl.spec 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  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 2.0.8
  6. Name: MySQL-mroonga
  7. Version: 2.08
  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. * Fri Nov 16 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.08-1
  97. - new upstream release.
  98. * Sat Sep 15 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.06-1
  99. - initial build for Vine Linux.
  100. * Wed Aug 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.06-0
  101. - new upstream release.
  102. - make MySQL spec file name customizable.
  103. - make mroonga configure options customizable.
  104. - add missing mysql-devel BuildRequires. Reported by wing. Thanks!!!
  105. - use MySQL 5.5.27.
  106. * Sun Jul 29 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.05-0
  107. - new upstream release.
  108. - use MySQL 5.5.25a.
  109. * Fri Jun 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.04-0
  110. - new upstream release.
  111. - ensure deleting mroonga plugin before install.
  112. Suggested by Kazuhiro Isobe. Thanks!!!
  113. - use MySQL 5.5.25.
  114. * Tue May 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.03-0
  115. - new upstream release.
  116. - use MySQL 5.5.24.
  117. - make mysql_* variables customizable
  118. - require groonga 2.0.3 or later.
  119. * Sun Apr 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.02-0
  120. - new upstream release.
  121. - use MySQL 5.5.23.
  122. - require groonga 2.0.2 or later.
  123. * Thu Mar 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.01-0
  124. - new upstream release.
  125. - ensure plugin is uninstalled by closing all tables use mroonga.
  126. * Wed Feb 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.00-0
  127. - new upstream release.
  128. - always install/uninstall plugin.
  129. - use MySQL 5.1.61 and 5.5.21.
  130. - require groonga 2.0.0 or later.
  131. * Sun Jan 29 2012 Kouhei Sutou <kou@clear-code.com> - 1.20-0
  132. - new upstream release.
  133. - require groonga 1.3.0.
  134. - groonga -> mroonga.
  135. - use MySQL 5.5.20.
  136. * Thu Dec 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.11-0
  137. - new upstream release.
  138. * Sat Oct 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.10-0
  139. - new upstream release.
  140. - groonga storage engine -> mroonga.
  141. * Thu Sep 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.0.0-0
  142. - new upstream release.
  143. * Mon Aug 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.9-0
  144. - new upstream release.
  145. * Fri Jul 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.8-0
  146. - new upstream release.
  147. * Wed Jun 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.7-0
  148. - new upstream release.
  149. * Sun May 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.6-0
  150. - new upstream release.
  151. * Thu May 17 2011 Kouhei Sutou <kou@clear-code.com> - 0.5-2
  152. - use MySQL 5.5.12.
  153. * Thu Mar 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.5-1
  154. - new upstream release.
  155. * Sat Jan 29 2011 Kouhei Sutou <kou@clear-code.com> - 0.4-4
  156. - do not remove plugin on upgrade.
  157. * Wed Jan 12 2011 Kouhei Sutou <kou@clear-code.com> - 0.4-3
  158. - rebuild without debug symbol.
  159. * Thu Dec 30 2010 Kouhei Sutou <kou@clear-code.com> - 0.4-2
  160. - use MySQL 5.5.8-1.
  161. - fix SQL literal notation.
  162. * Mon Nov 29 2010 Kouhei Sutou <kou@clear-code.com> - 0.4-1
  163. - use the latest MySQL.
  164. - new upstream release.
  165. * Sun Nov 21 2010 Kouhei Sutou <kou@clear-code.com> - 0.3-2
  166. - install user define function.
  167. * Fri Oct 29 2010 Kouhei Sutou <kou@clear-code.com> - 0.3-1
  168. - new upstream release.
  169. * Fri Oct 08 2010 Kouhei Sutou <kou@clear-code.com> - 0.2-2
  170. - specify target MySQL version.
  171. - use %{version}.
  172. * Wed Sep 29 2010 Kouhei Sutou <kou@clear-code.com> - 0.2-1
  173. - new upstream release.
  174. * Wed Sep 12 2010 Kouhei Sutou <kou@clear-code.com> - 0.1-3
  175. - require MySQL-client-community.
  176. * Fri Sep 10 2010 Kouhei Sutou <kou@clear-code.com> - 0.1-2
  177. - use MySQL-devel-community.
  178. * Fri Sep 03 2010 Kouhei Sutou <kou@clear-code.com> - 0.1-1
  179. - initial packaging for CentOS.