|
@@ -4,11 +4,11 @@
|
|
%define mysql_version %{__mariadb_version}
|
|
%define mysql_version %{__mariadb_version}
|
|
%define mysql_release %{__mariadb_release}
|
|
%define mysql_release %{__mariadb_release}
|
|
|
|
|
|
-%define groonga_required_version 4.0.1
|
|
|
|
|
|
+%define groonga_required_version 4.0.2
|
|
|
|
|
|
Name: mariadb-mroonga
|
|
Name: mariadb-mroonga
|
|
-Version: 4.01
|
|
|
|
-Release: 2%{?_dist_release}
|
|
|
|
|
|
+Version: 4.03
|
|
|
|
+Release: 1%{?_dist_release}
|
|
Summary: A fast fulltext searchable storage engine for MariaDB.
|
|
Summary: A fast fulltext searchable storage engine for MariaDB.
|
|
|
|
|
|
Group: Applications/Databases
|
|
Group: Applications/Databases
|
|
@@ -16,8 +16,8 @@ License: LGPLv2.1
|
|
URL: http://mroonga.github.com/
|
|
URL: http://mroonga.github.com/
|
|
Source0: http://github.com/downloads/mroonga/mroonga/mroonga-%{version}.tar.gz
|
|
Source0: http://github.com/downloads/mroonga/mroonga/mroonga-%{version}.tar.gz
|
|
### the next release may include the follwing patches.
|
|
### the next release may include the follwing patches.
|
|
-Patch0: 4a3d6c77a9.patch
|
|
|
|
-Patch1: 171fa019d4.patch
|
|
|
|
|
|
+#Patch0: 4a3d6c77a9.patch
|
|
|
|
+#Patch1: 171fa019d4.patch
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
|
|
BuildRequires: groonga-devel >= %{groonga_required_version}
|
|
BuildRequires: groonga-devel >= %{groonga_required_version}
|
|
@@ -51,8 +51,8 @@ Documentation for mroonga
|
|
|
|
|
|
%prep
|
|
%prep
|
|
%setup -q -n mroonga-%{version}
|
|
%setup -q -n mroonga-%{version}
|
|
-%patch0 -p1 -b .private
|
|
|
|
-%patch1 -p1 -b .LOCK_open
|
|
|
|
|
|
+#%patch0 -p1 -b .private
|
|
|
|
+#%patch1 -p1 -b .LOCK_open
|
|
|
|
|
|
%build
|
|
%build
|
|
mysql_source=%{_datadir}/mariadb-source/mariadb-%{mysql_version}
|
|
mysql_source=%{_datadir}/mariadb-source/mariadb-%{mysql_version}
|
|
@@ -71,52 +71,34 @@ mv -f %{buildroot}%{_datadir}/doc/mroonga/ mysql-mroonga-doc/
|
|
rm -rf %{buildroot}
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
%post
|
|
%post
|
|
-if [ "$1" = 2 ] ; then
|
|
|
|
- sql="
|
|
|
|
-USE mysql;
|
|
|
|
-DROP FUNCTION IF EXISTS mroonga_snippet;
|
|
|
|
-DROP FUNCTION IF EXISTS last_insert_grn_id;
|
|
|
|
-DROP FUNCTION IF EXISTS mroonga_command;
|
|
|
|
-DROP FUNCTION IF EXISTS mroonga_escape;
|
|
|
|
-UNINSTALL PLUGIN mroonga;
|
|
|
|
-FLUSH TABLES;
|
|
|
|
-"
|
|
|
|
- command="/usr/bin/mysql -u root -e \"$sql\""
|
|
|
|
- echo $command
|
|
|
|
- eval $command || \
|
|
|
|
- (echo "run the following command to unregister mroonga:"; \
|
|
|
|
- echo " $command")
|
|
|
|
|
|
+if [ "$1" = 1 ] ; then
|
|
|
|
+ /usr/bin/mysql -u root < %{_datadir}/mroonga/install.sql || cat <<EOF
|
|
|
|
+An error occured when to register plugin.
|
|
|
|
+Please run a command below:
|
|
|
|
+
|
|
|
|
+ /usr/bin/mysql -u root < %{_datadir}/mroonga/install.sql
|
|
|
|
+
|
|
|
|
+EOF
|
|
fi
|
|
fi
|
|
-sql="
|
|
|
|
-DELETE IGNORE FROM mysql.plugin WHERE name = 'mroonga';
|
|
|
|
-INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so';
|
|
|
|
-CREATE FUNCTION last_insert_grn_id RETURNS INTEGER SONAME 'ha_mroonga.so';
|
|
|
|
-CREATE FUNCTION mroonga_snippet RETURNS STRING SONAME 'ha_mroonga.so';
|
|
|
|
-CREATE FUNCTION mroonga_command RETURNS STRING SONAME 'ha_mroonga.so';
|
|
|
|
-CREATE FUNCTION mroonga_escape RETURNS STRING SONAME 'ha_mroonga.so';
|
|
|
|
-"
|
|
|
|
-command="/usr/bin/mysql -u root -e \"$sql\""
|
|
|
|
-echo $command
|
|
|
|
-eval $command || \
|
|
|
|
- (echo "run the following command to register mroonga:"; \
|
|
|
|
- echo " $command")
|
|
|
|
|
|
|
|
%preun
|
|
%preun
|
|
-if [ "$1" = 0 ]; then
|
|
|
|
- sql="
|
|
|
|
-USE mysql;
|
|
|
|
-DROP FUNCTION IF EXISTS mroonga_snippet;
|
|
|
|
-DROP FUNCTION IF EXISTS last_insert_grn_id;
|
|
|
|
-DROP FUNCTION IF EXISTS mroonga_command;
|
|
|
|
-DROP FUNCTION IF EXISTS mroonga_escape;
|
|
|
|
-UNINSTALL PLUGIN mroonga;
|
|
|
|
-FLUSH TABLES;
|
|
|
|
-"
|
|
|
|
- command="/usr/bin/mysql -u root -e \"$sql\""
|
|
|
|
- echo $command
|
|
|
|
- eval $command || \
|
|
|
|
- (echo "run the following command to unregister mroonga:"; \
|
|
|
|
- echo " $command")
|
|
|
|
|
|
+/usr/bin/mysql -u root < %{_datadir}/mroonga/uninstall.sql || cat <<EOF
|
|
|
|
+An error occured when to register plugin.
|
|
|
|
+Please run a command below:
|
|
|
|
+
|
|
|
|
+ /usr/bin/mysql -u root < %{_datadir}/mroonga/uninstall.sql
|
|
|
|
+
|
|
|
|
+EOF
|
|
|
|
+
|
|
|
|
+if [ "$1" != 0 ]; then
|
|
|
|
+
|
|
|
|
+ /usr/bin/mysql -u root < %{_datadir}/mroonga/install.sql || cat <<EOF
|
|
|
|
+An error occured when to register plugin.
|
|
|
|
+Please run a command below:
|
|
|
|
+
|
|
|
|
+ /usr/bin/mysql -u root < %{_datadir}/mroonga/install.sql
|
|
|
|
+
|
|
|
|
+EOF
|
|
fi
|
|
fi
|
|
|
|
|
|
%files
|
|
%files
|
|
@@ -124,6 +106,7 @@ fi
|
|
%{_libdir}/mysql/plugin/*
|
|
%{_libdir}/mysql/plugin/*
|
|
%{_datadir}/man/man1/*
|
|
%{_datadir}/man/man1/*
|
|
%{_datadir}/man/*/man1/*
|
|
%{_datadir}/man/*/man1/*
|
|
|
|
+%{_datadir}/mroonga
|
|
|
|
|
|
%files doc
|
|
%files doc
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
@@ -131,6 +114,10 @@ fi
|
|
%doc mysql-mroonga-doc/*
|
|
%doc mysql-mroonga-doc/*
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Sat May 31 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.03-1
|
|
|
|
+- new upstream release.
|
|
|
|
+- removed Patch0 and Patch1.
|
|
|
|
+
|
|
* Sun Apr 13 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.01-2
|
|
* Sun Apr 13 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.01-2
|
|
- fixed %%post and %%preun scripts.
|
|
- fixed %%post and %%preun scripts.
|
|
|
|
|