%define _centos_ver   %{?centos_ver:%{centos_ver}}%{!?centos_ver:5}

%define _use_lz4      %{?use_lz4:%{use_lz4}}%{!?use_lz4:%{_centos_ver} >= 6}
%define _use_zstd     %{?use_zstd:%{use_zstd}}%{!?use_zstd:%{_centos_ver} >= 6}
%define _use_mecab    %{?use_mecab:%{use_mecab}}%{!?use_mecab:1}
%define _use_jemalloc %{?use_jemalloc:%{use_jemalloc}}%{!?use_jemalloc:0}
%define _use_msgpack  %{?use_msgpack:%{use_msgpack}}%{!?use_msgpack:%{_centos_ver} >= 7}
%define _use_systemd  %{?use_systemd:%{use_systemd}}%{!?use_systemd:%{_centos_ver} >= 7}

%define _additional_configure_options \
  %{?additional_configure_options:%{additional_configure_options}}

%global _initddir %{_sysconfdir}/init.d/

Name:		groonga
Version:	@VERSION@
Release:	1%{?dist}
Summary:	An Embeddable Fulltext Search Engine

Group:		Applications/Text
License:	LGPLv2
URL:		http://groonga.org/
Source0:	http://packages.groonga.org/source/groonga/groonga-%{version}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
%if %{_use_mecab}
BuildRequires:	mecab-devel
%endif
BuildRequires:	zlib-devel
%if %{_use_lz4}
BuildRequires:	lz4-devel
%endif
%if %{_use_zstd}
BuildRequires:	libzstd-devel
%endif
%if %{_use_jemalloc}
BuildRequires:	jemalloc-devel
%endif
%if %{_use_msgpack}
BuildRequires:	msgpack-devel
%endif
BuildRequires:	pcre-devel
BuildRequires:	pkgconfig
BuildRequires:	openssl-devel
#BuildRequires:	zeromq-devel
#BuildRequires:	libevent-devel
%if %{_use_systemd}
BuildRequires:	systemd
%endif
Requires:	%{name}-libs = %{version}-%{release}
Requires:	%{name}-plugin-suggest = %{version}-%{release}
Obsoletes:	%{name} < 1.2.2-0

%description
Groonga is an embeddable full-text search engine library.  It can
integrate with DBMS and scripting languages to enhance their search
functionality.  It also provides a standalone data store server based
on relational data model.

%package libs
Summary:	Runtime libraries for Groonga
Group:		System Environment/Libraries
License:	LGPLv2 and (MIT or GPLv2)
Requires:	zlib
%if %{_use_lz4}
Requires:	lz4
%endif
%if %{_use_zstd}
Requires:	libzstd
%endif
%if %{_use_jemalloc}
Requires:	jemalloc
%endif
%if %{_use_msgpack}
Requires:	msgpack
%endif
Requires(post):	/sbin/ldconfig
Requires(postun):	/sbin/ldconfig

%description libs
This package contains the libraries for Groonga

%package server-common
Summary:	Common packages for the Groonga server and the Groonga HTTP server
Group:		Applications/Text
License:	LGPLv2
Requires:	%{name} = %{version}-%{release}
Requires(pre):	shadow-utils

%description server-common
This package provides common settings for server use

%package server-gqtp
Summary:	Groonga GQTP server
Group:		Applications/Text
License:	LGPLv2
Requires:	%{name}-server-common = %{version}-%{release}
Requires(pre):	shadow-utils
%if %{_use_systemd}
%systemd_requires
%else
Requires(post):	/sbin/chkconfig
Requires(preun):	/sbin/chkconfig
Requires(preun):	/sbin/service
Requires(postun):	/sbin/service
%endif
Obsoletes:	%{name} < 1.2.2-0
Obsoletes:	%{name}-server < 2.0.7-0

%description server-gqtp
This package contains the Groonga GQTP server

%package server-http
Summary:	Groonga HTTP server (transitional)
Group:		Applications/Text
License:	LGPLv2
Requires:	%{name}-server-common = %{version}-%{release}
Requires:	curl
Requires:	%{name}-httpd = %{version}-%{release}
Requires(pre):	shadow-utils
%if %{_use_systemd}
%systemd_requires
%else
Requires(post):	/sbin/chkconfig
Requires(preun):	/sbin/chkconfig
Requires(preun):	/sbin/service
Requires(postun):	/sbin/service
%endif
Obsoletes:	%{name} < 1.2.2-0
Obsoletes:	%{name}-server < 2.0.7-0

%description server-http
This is a transitional package to groonga-httpd.

%package httpd
Summary:	Groonga HTTP server
Group:		Applications/Text
License:	LGPLv2 and BSD
Requires:	%{name}-server-common = %{version}-%{release}
%if %{_use_systemd}
%systemd_requires
%else
Requires(post):	/sbin/chkconfig
Requires(preun):	/sbin/chkconfig
Requires(preun):	/sbin/service
Requires(postun):	/sbin/service
%endif
Provides:	%{name}-server-http = %{version}-%{release}
Obsoletes:	%{name}-server-http <= 4.0.7-2

%description httpd
This package contains the Groonga HTTP server. It has
many features because it is based on nginx HTTP server.

%package doc
Summary:	Documentation for Groonga
Group:		Documentation
License:	LGPLv2 and BSD

%description doc
Documentation for Groonga

%package devel
Summary:	Libraries and header files for Groonga
Group:		Development/Libraries
Requires:	%{name}-libs = %{version}-%{release}

%description devel
Libraries and header files for Groonga

%if %{_use_mecab}
%package tokenizer-mecab
Summary:	MeCab tokenizer for Groonga
Group:		Applications/Text
Requires:	%{name}-libs = %{version}-%{release}
Requires:       mecab-dic

%description tokenizer-mecab
MeCab tokenizer for Groonga
%endif

%package plugin-suggest
Summary:	Suggest plugin for Groonga
Group:		Applications/Text
Requires:	%{name}-libs = %{version}-%{release}

%description plugin-suggest
Sugget plugin for Groonga

%package munin-plugins
Summary:	Munin plugins for Groonga
Group:		Applications/System
Requires:	%{name}-libs = %{version}-%{release}
Requires:	munin-node
Requires(post):	munin-node
Requires(post):	/sbin/service
Requires(postun):	/sbin/service

%description munin-plugins
Munin plugins for Groonga

%prep
#% define optflags -O0
%setup -q


%build
%configure \
  --disable-static \
  --with-package-platform=centos%{?centos_ver} \
%if ! %{_use_lz4}
  --without-lz4 \
%endif
%if ! %{_use_zstd}
  --without-zstd \
%endif
%if %{_use_mecab}
  --with-mecab \
%else
  --without-mecab \
%endif
%if ! %{_use_msgpack}
  --without-message-pack \
%endif
  --with-munin-plugins \
  --enable-mruby \
  %{_additional_configure_options:%{additional_configure_options}}

sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
rm $RPM_BUILD_ROOT%{_libdir}/groonga/plugins/*/*.la
rm $RPM_BUILD_ROOT%{_libdir}/*.la

mv $RPM_BUILD_ROOT%{_datadir}/doc/groonga groonga-doc

mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/groonga
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/groonga/db
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/groonga

mv $RPM_BUILD_ROOT%{_datadir}/groonga/munin/ $RPM_BUILD_ROOT%{_datadir}/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/munin/plugin-conf.d/
cat <<EOC > $RPM_BUILD_ROOT%{_sysconfdir}/munin/plugin-conf.d/groonga
[groonga_*]
  user groonga
  group groonga
  env.PATH ${_bindir}
  env.database_path %{_localstatedir}/lib/groonga/db/db
  env.host 127.0.0.1

  env.http_host 127.0.0.1
  env.http_port 10041
  env.http_database_path %{_localstatedir}/lib/groonga/db/db
  env.http_pid_path %{_localstatedir}/run/groonga/groonga-http.pid
  env.http_query_log_path %{_localstatedir}/log/groonga/query-http.log

  env.httpd_host 127.0.0.1
  env.httpd_port 10041
  env.httpd_database_path %{_localstatedir}/lib/groonga/db/db
  env.httpd_pid_path %{_localstatedir}/run/groonga/groonga-httpd.pid
  env.httpd_query_log_path %{_localstatedir}/log/groonga/httpd/groonga-query.log

  env.gqtp_host 127.0.0.1
  env.gqtp_port 10043
  env.gqtp_database_path %{_localstatedir}/lib/groonga/db/db
  env.gqtp_pid_path %{_localstatedir}/run/groonga/groonga-gqtp.pid
  env.gqtp_query_log_path %{_localstatedir}/log/groonga/query-gqtp.log
EOC

%clean
rm -rf $RPM_BUILD_ROOT

%pre server-common
getent group groonga >/dev/null || groupadd -r groonga
getent passwd groonga >/dev/null || \
       useradd -r -g groonga -d %{_localstatedir}/lib/groonga -s /sbin/nologin \
	-c 'groonga' groonga
if [ $1 = 1 ]; then
	mkdir -p %{_localstatedir}/lib/groonga/db
	groonga -n %{_localstatedir}/lib/groonga/db/db shutdown > /dev/null
	chown -R groonga:groonga %{_localstatedir}/lib/groonga
	mkdir -p %{_localstatedir}/run/groonga
	chown -R groonga:groonga %{_localstatedir}/run/groonga
fi
exit 0

%post server-gqtp
%if %{_use_systemd}
%systemd_post groonga-server-gqtp.service
%else
/sbin/chkconfig --add groonga-server-gqtp
%endif

%post server-http
%if %{_use_systemd}
%systemd_post groonga-server-http.service
%else
/sbin/chkconfig --add groonga-server-http
%endif

%post httpd
if [ $1 = 1 ] ; then
	mkdir -p %{_localstatedir}/log/groonga/httpd
	chown -R groonga:groonga %{_localstatedir}/log/groonga/httpd
%if %{_use_systemd}
%systemd_post groonga-httpd.service
%else
	/sbin/chkconfig --add groonga-httpd
%endif
elif [ $1 = 2 ] ; then
	/usr/sbin/groonga-httpd-restart > /dev/null 2>&1 || :
fi

%post libs -p /sbin/ldconfig

%post munin-plugins
%{_sbindir}/munin-node-configure --shell --remove-also | grep -e 'groonga_' | sh
[ -f %{_localstatedir}/lock/subsys/munin-node ] && \
	/sbin/service munin-node restart > /dev/null 2>&1
:

%preun server-http
%if %{_use_systemd}
%systemd_preun groonga-server-http.service
%else
if [ $1 = 0 ] ; then
	/sbin/service groonga-server-http stop >/dev/null 2>&1 || :
	/sbin/chkconfig --del groonga-server-http
fi
%endif

%postun server-http
%if %{_use_systemd}
%systemd_postun groonga-server-http.service
%else
if [ $1 -ge 1 ] ; then
	/sbin/service groonga-server-http condrestart >/dev/null 2>&1 || :
fi
%endif

%preun server-gqtp
%if %{_use_systemd}
%systemd_preun groonga-server-gqtp.service
%else
if [ $1 = 0 ] ; then
	/sbin/service groonga-server-http stop >/dev/null 2>&1 || :
	/sbin/chkconfig --del groonga-server-gqtp
fi
%endif

%postun server-gqtp
%if %{_use_systemd}
%systemd_postun groonga-server-gqtp.service
%else
if [ $1 -ge 1 ] ; then
	/sbin/service groonga-server-gqtp condrestart >/dev/null 2>&1 || :
fi
%endif

%preun httpd
%if %{_use_systemd}
%systemd_preun groonga-server-http.service
%else
if [ $1 = 0 ] ; then
	/sbin/service groonga-httpd stop >/dev/null 2>&1 || :
	/sbin/chkconfig --del groonga-httpd
fi
%endif

%postun httpd
%if %{_use_systemd}
%systemd_postun groonga-server-http.service
%else
if [ $1 -ge 1 ] ; then
	/sbin/service groonga-httpd condrestart >/dev/null 2>&1 || :
fi
%endif

%postun libs -p /sbin/ldconfig

%postun munin-plugins
if [ $1 -eq 0 ]; then
	[ -f %{_localstatedir}/lock/subsys/munin-node ] && \
		/sbin/service munin-node restart >/dev/null 2>&1
	:
fi


%files
%defattr(-,root,root,-)
%{_bindir}/groonga
%{_bindir}/groonga-benchmark
%{_bindir}/grndb

%files libs
%defattr(-,root,root,-)
%doc README.md COPYING
%{_libdir}/*.so.*
%dir %{_libdir}/groonga
%dir %{_libdir}/groonga/plugins
%dir %{_libdir}/groonga/plugins/functions
%dir %{_libdir}/groonga/plugins/tokenizers
%dir %{_libdir}/groonga/plugins/token_filters
%dir %{_libdir}/groonga/plugins/ruby
%dir %{_libdir}/groonga/plugins/sharding
%dir %{_libdir}/groonga/plugins/expression_rewriters
%dir %{_libdir}/groonga/scripts
%dir %{_libdir}/groonga/scripts/ruby
%dir %{_libdir}/groonga/scripts/ruby/command_line
%dir %{_libdir}/groonga/scripts/ruby/context
%dir %{_libdir}/groonga/scripts/ruby/initialize
%dir %{_libdir}/groonga/scripts/ruby/logger
%dir %{_libdir}/groonga/scripts/ruby/query_logger
%{_libdir}/groonga/plugins/functions/number.so
%{_libdir}/groonga/plugins/functions/vector.so
%{_libdir}/groonga/plugins/functions/string.so
%{_libdir}/groonga/plugins/functions/time.so
%{_libdir}/groonga/plugins/query_expanders/tsv.so
%{_libdir}/groonga/plugins/token_filters/stop_word.so
%{_libdir}/groonga/plugins/ruby/*.rb
%{_libdir}/groonga/plugins/*.rb
%{_libdir}/groonga/plugins/sharding/*.rb
%{_libdir}/groonga/plugins/expression_rewriters/*.rb
%{_libdir}/groonga/scripts/ruby/*.rb
%{_libdir}/groonga/scripts/ruby/command_line/*.rb
%{_libdir}/groonga/scripts/ruby/context/*.rb
%{_libdir}/groonga/scripts/ruby/expression_tree/*.rb
%{_libdir}/groonga/scripts/ruby/initialize/*.rb
%{_libdir}/groonga/scripts/ruby/logger/*.rb
%{_libdir}/groonga/scripts/ruby/query_logger/*.rb
%{_datadir}/groonga/
%config(noreplace) %{_sysconfdir}/groonga/synonyms.tsv

%files server-common

%files server-gqtp
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/groonga/
%config(noreplace) %{_sysconfdir}/sysconfig/groonga-server-gqtp
%config(noreplace) %{_sysconfdir}/logrotate.d/groonga-server-gqtp
%if %{_use_systemd}
%{_unitdir}/groonga-server-gqtp.service
%else
%{_initddir}/groonga-server-gqtp
%endif
%ghost %dir %{_localstatedir}/run/%{name}
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}/db

%files server-http
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/groonga/
%config(noreplace) %{_sysconfdir}/sysconfig/groonga-server-http
%config(noreplace) %{_sysconfdir}/logrotate.d/groonga-server-http
%if %{_use_systemd}
%{_unitdir}/groonga-server-http.service
%else
%{_initddir}/groonga-server-http
%endif
%ghost %dir %{_localstatedir}/run/%{name}
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}/db

%files httpd
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/groonga/httpd/*
%config(noreplace) %{_sysconfdir}/sysconfig/groonga-httpd
%config(noreplace) %{_sysconfdir}/logrotate.d/groonga-httpd
%if %{_use_systemd}
%{_unitdir}/groonga-httpd.service
%else
%{_initddir}/groonga-httpd
%endif
%{_sbindir}/groonga-httpd
%{_sbindir}/groonga-httpd-restart
%ghost %dir %{_localstatedir}/run/%{name}
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}/db

%files doc
%defattr(-,root,root,-)
%doc README.md COPYING
%doc groonga-doc/*

%files devel
%defattr(-,root,root,-)
%{_includedir}/groonga/
%{_libdir}/*.so
%{_libdir}/pkgconfig/groonga*.pc

%files plugin-suggest
%defattr(-,root,root,-)
%{_bindir}/groonga-suggest-*
%dir %{_libdir}/groonga/plugins
%{_libdir}/groonga/plugins/suggest/suggest.so

%if %{_use_mecab}
%files tokenizer-mecab
%defattr(-,root,root,-)
%{_libdir}/groonga/plugins/tokenizers/mecab.so
%endif

%files munin-plugins
%defattr(-,root,root,-)
%{_datadir}/munin/plugins/*
%config(noreplace) %{_sysconfdir}/munin/plugin-conf.d/*

%changelog
* Mon Jan 23 2017 Kouhei Sutou <kou@clear-code.com> - 6.1.5-1
- new upstream release.

* Wed Jan 18 2017 Kouhei Sutou <kou@clear-code.com> - 6.1.4-1
- new upstream release.

* Thu Jan 05 2017 Masafumi Yokoyama <myokoym@gmail.com> - 6.1.3-1
- new upstream release.

* Thu Dec 29 2016 Kentaro Hayashi <hayashi@clear-code.com> - 6.1.2-1
- new upstream release.

* Fri Nov 11 2016 Kouhei Sutou <kou@clear-code.com> - 6.1.1-0
- add Zstandard support.

* Sat Oct 29 2016 Kentaro Hayashi <hayashi@clear-code.com> - 6.1.0-1
- new upstream release.

* Thu Sep 29 2016 Kentaro Hayashi <hayashi@clear-code.com> - 6.0.9-1
- new upstream release.

* Mon Aug 29 2016 Kentaro Hayashi <hayashi@clear-code.com> - 6.0.8-1
- new upstream release.

* Fri Jul 29 2016 Kentaro Hayashi <hayashi@clear-code.com> - 6.0.7-1
- new upstream release.

* Wed Jun 29 2016 Kentaro Hayashi <hayashi@clear-code.com> - 6.0.5-1
- new upstream release.

* Mon Jun 06 2016 Kouhei Sutou <kou@clear-code.com> - 6.0.4-1
- new upstream release.

* Sun May 29 2016 Kentaro Hayashi <hayashi@clear-code.com> - 6.0.3-1
- new upstream release.

* Fri Apr 29 2016 HAYASHI Kentaro <hayashi@clear-code.com> - 6.0.2-1
- new upstream release.

* Tue Mar 29 2016 HAYASHI Kentaro <hayashi@clear-code.com> - 6.0.1-1
- new upstream release.

* Mon Feb 29 2016 HAYASHI Kentaro <hayashi@clear-code.com> - 6.0.0-1
- new upstream release.
- add functions/string plugin GitHub#459

* Fri Jan 29 2016 Kouhei Sutou <kou@clear-code.com> - 5.1.2-1
- new upstream release.

* Tue Dec 29 2015 Kouhei Sutou <kou@clear-code.com> - 5.1.1-1
- new upstream release.

* Sun Nov 29 2015 Kouhei Sutou <kou@clear-code.com> - 5.1.0-1
- new upstream release.

* Thu Oct 29 2015 Kouhei Sutou <kou@clear-code.com> - 5.0.9-1
- new upstream release.

* Tue Sep 29 2015 Kouhei Sutou <kou@clear-code.com> - 5.0.8-1
- new upstream release.

* Mon Aug 31 2015 Kouhei Sutou <kou@clear-code.com> - 5.0.7-1
- new upstream release.

* Wed Jul 29 2015 Masafumi Yokoyama <yokoyama@clear-code.com> - 5.0.6-1
- new upstream release.

* Mon Jun 29 2015 Masafumi Yokoyama <myokoym@gmail.com> - 5.0.5-1
- new upstream release.

* Fri May 29 2015 Masafumi Yokoyama <yokoyama@clear-code.com> - 5.0.4-1
- new upstream release.

* Wed Apr 29 2015 HAYASHI Kentaro <hayashi@clear-code.com> - 5.0.3-1
- new upstream release.
- add vector size plugin.

* Tue Mar 31 2015 Masafumi Yokoyama <yokoyama@clear-code.com> - 5.0.2-1
- new upstream release.
- removed fix-crash-by-missing-libedit-initialization.patch

* Mon Mar 30 2015 HAYASHI Kentaro <hayashi@clear-code.com> - 5.0.1-2
- fix crash bug in standalone mode.
  added fix-crash-by-missing-libedit-initialization.patch

* Sun Mar 29 2015 HAYASHI Kentaro <hayashi@clear-code.com> - 5.0.1-1
- new upstream release.

* Mon Feb 09 2015  <hayashi@clear-code.com> - 5.0.0-1
- new upstream release.

* Thu Jan 29 2015 HAYASHI Kentaro <hayashi@clear-code.com> - 4.1.1-1
- new upstream release.

* Fri Jan 09 2015 Kouhei Sutou <kou@clear-code.com> - 4.1.0-1
- new upstream release.

* Mon Dec 29 2014 Kouhei Sutou <kou@cozmixng.org> - 4.0.9-1
- new upstream release.

* Sat Nov 29 2014 HAYASHI Kentaro <hayashi@clear-code.com> - 4.0.8-1
- new upstream release.
- make groonga-httpd as default HTTP server package
- drop groonga-server-http, it is just changed to transitional package

* Wed Oct 29 2014 Kouhei Sutou <kou@clear-code.com> - 4.0.7-1
- new upstream release.

* Mon Sep 29 2014 Kouhei Sutou <kou@cozmixng.org> - 4.0.6-1
- new upstream release.

* Fri Aug 29 2014 Kouhei Sutou <kou@clear-code.com> - 4.0.5-1
- new upstream release.

* Tue Jul 29 2014 HAYASHI Kentaro <hayashi@clear-code.com> - 4.0.4-1
- new upstream release.

* Sun Jun 29 2014 Kouhei Sutou <kou@clear-code.com> - 4.0.3-1
- new upstream release.

* Thu May 29 2014 Kouhei Sutou <kou@clear-code.com> - 4.0.2-0
- new upstream release.

* Sat Mar 29 2014 HAYASHI Kentaro <hayashi@clear-code.com> - 4.0.1-1
- new upstream release.

* Sun Feb 09 2014 HAYASHI Kentaro <hayashi@clear-code.com> - 4.0.0-1
- new upstream release.

* Wed Jan 29 2014 HAYASHI Kentaro <hayashi@clear-code.com> - 3.1.2-1
- new upstream release.

* Sun Dec 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.1.1-1
- new upstream release.

* Fri Nov 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.1.0-1
- new upstream release.

* Tue Oct 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.0.9-1
- new upstream release.

* Sun Sep 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.0.8-1
- new upstream release.

* Thu Aug 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.0.7-1
- new upstream release.

* Mon Jul 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.0.6-1
- new upstream release.

* Sat Jun 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.0.5-0
- new upstream release.

* Wed May 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.0.4-0
- new upstream release.

* Mon Apr 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.0.3-0
- Add additional_configure_options parameter.
- Make MeCab optional. Use use_mecab parameter for it.

* Fri Mar 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.0.2-0
- new upstream release.

* Thu Feb 28 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.0.1-0
- new upstream release.

* Sat Feb 09 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 3.0.0-0
- new upstream release.

* Tue Jan 29 2013 HAYASHI Kentaro <hayashi@clear-code.com> - 2.1.2-0
- new upstream release.

* Sat Dec 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.1.1-0
- new upstream release.

* Sat Dec 29 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.1.0-0
- new upstream release.

* Thu Nov 29 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.0.9-0
- new upstream release.

* Mon Oct 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.8-0
- new upstream release.
- Remove needless "Requires". They will be added by rpmbuild automatically.
  Reported by by Daiki Ueno. Thanks!!!
- Fix license of server-gqtp.
- Fix license of server-http.
- Add more description to server-http and httpd.

* Sat Sep 29 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.0.7-0
- new upstream release.
- Split groonga-server package into groonga-server-gqtp and
  groonga-server-http package.

* Wed Aug 29 2012 HAYASHI Kentaro <hayashi@clear-code.com> - 2.0.6-0
- new upstream release.
- Split common tasks for server use into groonga-server-common package.
- groonga-server and groonga-httpd require groonga-server-common package.

* Sun Jul 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.5-0
- new upstream release.
- split groonga-httpd related files into groonga-httpd package.

* Fri Jun 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.4-0
- new upstream release.
- groonga package does not require groonga-tokenizer-mecab package.

* Tue May 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.3-0
- new upstream release.

* Sun Apr 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.2-0
- new upstream release.

* Fri Mar 30 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.1-2
- Use shutdown command for stop.

* Fri Mar 30 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.1-1
- Fix bind address argument parameter.
  Patch by Masaharu IWAI. Thanks!!!

* Thu Mar 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.1-0
- new upstream release.
- grntest -> groonga-benchmark.
- remove groong-tools package.

* Wed Feb 29 2012 Kouhei Sutou <kou@clear-code.com> - 2.0.0-0
- new upstream release.
- remove other permission from DB directory.
- install init.d related files directly.
- use HTTP as the default protocol.

* Sun Jan 29 2012 Kouhei Sutou <kou@clear-code.com> - 1.3.0-0
- new upstream release.
- groonga-server package does not require groonga-munin-plugins package.
  suggested by Masaharu IWAI. Thanks!!!
- groonga package does not require groonga-doc package.
  suggested by Masaharu IWAI. Thanks!!!

* Thu Dec 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.9-0
- new upstream release.

* Tue Nov 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.8-0
- new upstream release.
- enable zlib support.
- enable lzo support.
- add --with-package-platform=redhat configure option to install init script.
- add --with-munin-plugins cofnigure option to install Munin plugins.

* Sat Oct 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.7-0
- new upstream release.

* Thu Sep 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.6-0
- new upstream release.

* Mon Aug 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.5-0
- new upstream release.

* Fri Jul 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.4-0
- new upstream release.

* Wed Jun 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.3-0
- new upstream release.
- add a new groong-tools package.

* Sun May 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.2-0
- new upstream release.
- split server files into groonga-server package.

* Fri Apr 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.1-0
- new upstream release.

* Tue Mar 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.2.0-0
- new upstream release.

* Wed Feb 09 2011 Kouhei Sutou <kou@clear-code.com> - 1.1.0-0
- new upstream release.

* Wed Feb 02 2011 Kouhei Sutou <kou@clear-code.com> - 1.0.8-0
- new upstream release.

* Sat Jan 29 2011 Kouhei Sutou <kou@clear-code.com> - 1.0.7-0
- new upstream release.

* Fri Dec 31 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.6-0
- new upstream release

* Wed Dec 29 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.5-0
- new upstream release.

* Mon Nov 29 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.4-1
- new upstream release

* Wed Nov 24 2010 Daiki Ueno <dueno@redhat.com> - 1.0.3-2
- %%ghost /var/run/*.

* Fri Oct 29 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.3-1
- new upstream release.

* Sat Oct 09 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.2-2
- merge Fedora changes.

* Thu Sep 09 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.2-1
- new upstream release.

* Mon Sep 06 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.1-1
- new upstream release.

* Thu Sep 02 2010 Kouhei Sutou <kou@clear-code.com> - 1.0.0-1
- split packages.

* Tue Aug 24 2010 Daiki Ueno <dueno@redhat.com> - 0.7.6-1
- initial packaging for Fedora
