Summary: A query cache plugin for mysqlnd
Summary(ja): mysqlnd クエリキャッシュプラグイン
Name: php-ext-mysqlnd_qc
Version: 1.2.0
Release: 1%{_dist_release}
URL: http://pecl.php.net/package/mysqlnd_qc
Source: mysqlnd_qc-%{version}.tgz
License: The PHP License
Group: Development/Languages
BuildRequires: php5-devel, libmemcached-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: php5-mysql

%if "%{?req_php_api}" != ""
Requires: %{req_php_api}
%endif

%description
 The mysqlnd query result cache plugin is a mysqlnd plugin. It adds basic
client side result set caching to all PHP MySQL extensions (ext/mysql,
ext/mysqli, PDO_MySQL). if they are compiled to use mysqlnd. It does not
change the API of the MySQL extensions and thus it operates virtually
transparent for applications."

%description -l ja
 このプラグインは、mysqlndを利用している全てのMySQL拡張(mysql, mysqli,
pdo_mysql)に、クライアント側での結果セットのキャッシュ機能を追加します。
また、MySQL拡張のAPIは変えることなく、透過的に動作します。

%prep
%setup -q -n mysqlnd_qc-%{version}
rm -f ../package.xml

/usr/bin/phpize

%build
%configure --enable-mysqlnd-qc-memcache
%__make %{_smp_mflags}

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_libdir}/php5/
mkdir -p %{buildroot}%{_sysconfdir}/php5/php.d
%makeinstall INSTALL_ROOT=%{buildroot}

cat > %{buildroot}%{_sysconfdir}/php5/php.d/mysqlnd_qc.ini <<EOF
; Enable mysqlnd_qc extension module
extension=mysqlnd_qc.so
EOF


%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc CHANGES CREDITS LICENSE README web
%{_libdir}/php5/*
%{_sysconfdir}/php5/php.d/*

%changelog
* Thu Oct 03 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.2.0-1
- new upstream release.

* Thu May 03 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.1-2
- enabled memcache handler.

* Sat Apr 28 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.1-1
- initial build.