Browse Source

mariadb-10.0.15-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@9133 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 9 years ago
parent
commit
c54ef14e72
1 changed files with 78 additions and 3 deletions
  1. 78 3
      m/mariadb/mariadb-vl.spec

+ 78 - 3
m/mariadb/mariadb-vl.spec

@@ -1,3 +1,5 @@
+%bcond_with source
+
 %define mysqld_user		mysql
 %define mysqld_group		mysql
 %define mysqldatadir /var/lib/mysql
@@ -9,7 +11,8 @@
 %define _unpackaged_files_terminate_build 1
 
 %define mariadb_base_version	10.0
-%define mariadb_version		10.0.14
+%define mariadb_version		10.0.15
+%define mroonga_version		4.06
 %define client_version		18
 
 Vendor: Project Vine
@@ -38,6 +41,7 @@ BuildRequires:	bison, cmake, gcc-c++, groff
 BuildRequires:	libaio-devel, libboost-devel, libevent-devel, libxml2-devel
 BuildRequires:	ncurses-devel, perl, openssl-devel, readline-devel
 BuildRequires:	zlib-devel
+BuildRequires:	mecab-devel
 Requires:		fileutils sh-utils
 Provides:		msqlormysql MySQL mysql
 Obsoletes:		mysql MySQL5
@@ -54,6 +58,7 @@ MariaDB bug reports should be submitted through https://mariadb.atlassian.net/
 
 
 %package server
+Version:	%{mariadb_version}
 Release: %{release}
 Summary:	MariaDB: a very fast and robust SQL database server
 Group:		Applications/Databases
@@ -72,8 +77,22 @@ conditions of the GNU General Public License Version 2 (http://www.gnu.org/licen
 MariaDB documentation can be found at http://kb.askmonty.org/
 MariaDB bug reports should be submitted through https://mariadb.atlassian.net/
 
+%package mroonga
+##Version: %{mroonga_version}
+Version:	%{mariadb_version}
+Summary:	A fast fulltext searchable storage engine for MariaDB.
+Group:		Applications/Databases
+Requires(pre):	mariadb-server = %{mariadb_version}-%{release}
+Requires:	mariadb-server = %{mariadb_version}-%{release}
+Obsoletes:	mariadb-mroonga-doc < 4.07
+
+%description mroonga
+Mroonga is a fast fulltext searchable storage plugin for MariaDB.
+It is based on groonga that is a fast fulltext search engine and
+column store. Groonga is good at real-time update.
 
 %package client
+Version:	%{mariadb_version}
 Summary: MariaDB - Client
 Group: Applications/Databases
 Obsoletes: mysql-client MySQL-client < 5.6.0
@@ -84,6 +103,7 @@ This package contains the standard MariaDB clients and administration tools.
 
 
 %package devel
+Version:	%{mariadb_version}
 Summary: MariaDB - Development libraries and headers
 Group: Development/Libraries
 Requires: %{name}-static, openssl-devel, zlib-devel
@@ -96,6 +116,7 @@ MariaDB server components (e.g. plugins or embedded applications).
 
 
 %package static
+Version:	%{mariadb_version}
 Summary: MariaDB - static libraries
 Group: Development/Libraries
 Requires: %{name}-devel
@@ -103,8 +124,9 @@ Requires: %{name}-devel
 %description static
 This package provides static libraries of MariaDB.
 
-
+%if %{with source}
 %package source
+Version:	%{mariadb_version}
 Summary: MariaDB - Source
 Group: Development/Libraries
 Requires: mariadb-devel = %{version}-%{release}
@@ -114,8 +136,10 @@ AutoReqProv: no
 %description source
 This package contains the sources files of MariaDB.
 
+%endif
 
 %package test
+Version:	%{mariadb_version}
 Requires: %{name}-client = %{version}-%{release} perl-DBI perl
 Summary: MariaDB - Test suite
 Group: Applications/Databases
@@ -127,6 +151,7 @@ This package contains the MariaDB regression test suite.
 
 
 %package embedded
+Version:	%{mariadb_version}
 Summary: MariaDB as an embeddable library
 Group: System Environment/Libraries
 Obsoletes: mysql-embedded MySQL-embedded
@@ -174,7 +199,8 @@ mkdir release
       -DWITH_SEQUENCE_STORAGE_ENGINE="ON" \
       -DWITH_XTRADB_STORAGE_ENGINE="ON" \
       -DWITHOUT_TOKUDB=1 \
-	  -DWITH_JEMALLOC="no"
+      -DWITH_JEMALLOC="no" \
+      -DGRN_WITH_MECAB="yes"
 
 #      -DWITH_PCRE="system" 
 
@@ -199,11 +225,13 @@ install -m 0644  Docs/mysql.info %{buildroot}%{_infodir}
 rm -rf ./doc
 mv -f %{buildroot}%{_docdir} ./
 
+%if %{with source}
 mkdir -p %{buildroot}%{_datadir}/%{name}-source
 pushd %{buildroot}%{_datadir}/%{name}-source
 tar zxf %{SOURCE0}
 find %{buildroot}%{_datadir}/%{name}-source -type f -exec chmod ugo-x {} \;
 popd
+%endif
 
 install -d %{buildroot}%{_sysconfdir}/rpm
 sed -e 's/@BASEVERSION@/%{mariadb_base_version}/' -e 's/@VERSION@/%{version}/' -e 's/@RELEASE@/%{release}/' < %{SOURCE1000} > %{buildroot}%{_sysconfdir}/rpm/macros.mariadb
@@ -295,6 +323,40 @@ if [ $1 -ge 1 ]; then
   fi
 fi
 
+%pre mroonga
+if [ $1 -gt 1 ]; then
+/usr/bin/mysql -u root < %{_datadir}/mysql/mroonga/uninstall.sql || cat <<EOF
+An error occured when to register plugin.
+Please run a command below:
+
+  /usr/bin/mysql -u root < %{_datadir}/mysql/mroonga/uninstall.sql
+
+EOF
+
+fi
+
+%post mroonga
+if [ $1 -eq 1 ] ; then
+	/usr/bin/mysql -u root < %{_datadir}/mysql/mroonga/install.sql || cat <<EOF
+An error occured when to register plugin.
+Please run a command below:
+
+  /usr/bin/mysql -u root < %{_datadir}/mysql/mroonga/install.sql
+
+EOF
+fi
+
+%postun mroonga
+if [ $1 -gt 0 ] ; then
+	/usr/bin/mysql -u root < %{_datadir}/mysql/mroonga/install.sql || cat <<EOF
+An error occured when to register plugin.
+Please run a command below:
+
+  /usr/bin/mysql -u root < %{_datadir}/mysql/mroonga/install.sql
+
+EOF
+fi
+
 # Clean up the BuildRoot
 %clean
 [ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
@@ -362,6 +424,8 @@ fi
 %{_bindir}/resolveip
 #%{_bindir}/tokuftdump
 %{_sbindir}/mysqld
+%exclude %{_libdir}/mysql/plugin/ha_mroonga.so
+%exclude %{_datadir}/mysql/mroonga
 %{_libdir}/mysql
 %config(noreplace) %{_sysconfdir}/my.cnf.d/server.cnf
 #%config(noreplace) %{_sysconfdir}/my.cnf.d/tokudb.cnf
@@ -370,6 +434,11 @@ fi
 %{_datadir}/mysql
 %attr(755, mysql, mysql) %dir %{mysqldatadir}
 
+%files mroonga
+%defattr(-, root, root)
+%{_libdir}/mysql/plugin/ha_mroonga.so
+%{_datadir}/mysql/mroonga
+
 %files client
 %defattr(-, root, root)
 %config(noreplace) %{_sysconfdir}/my.cnf.d/mysql-clients.cnf
@@ -414,9 +483,11 @@ fi
 %defattr(-,root,root)
 %{_libdir}/lib*.a
 
+%if %{with source}
 %files source
 %defattr(-, root, root)
 %{_datadir}/mariadb-source
+%endif
 
 %files test
 %defattr(-, root, root)
@@ -436,6 +507,10 @@ fi
 
 
 %changelog
+* Wed Nov 26 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.15-1
+- new upstream release.
+- enabled bundled Mroonga.
+
 * Mon Sep 29 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.14-1
 - new upstream release.