Summary: memcache extension for PHP
Summary(ja): PHP用memcache拡張
Name: php-ext-memcache
Version: 2.2.6
Release: 3%{_dist_release}
Source: memcache-%{version}.tgz
Patch0: memcache-2.2.6-session_strict.patch
License: The PHP License
Group: Development/Languages
BuildRequires: php5-devel
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: %{req_php_api}

%description
This module enable to access memcached in PHP scripts.

%description -l ja
このモジュールは、PHPスクリプト中でmemcachedにアクセスできるようにします。

%prep
%setup -q -n memcache-%{version}
%patch0 -p1 -b .session_strict
mv ../package.xml ./
phpize

%build
%configure --enable-memcache-session=yes
%__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/memcache.ini <<EOF
; Enable memcache extension module
extension=memcache.so

memcache.allow_failover = 1
memcache.max_failover_attempts = 20
memcache.chunk_size = 16384
memcache.default_port = 11211
memcache.hash_function = crc32
memcache.hash_strategy = consistent
EOF


%clean
rm -rf %{buildroot}

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

%changelog
* Sun Apr 29 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2.6-3
- converted encoding to UTF-8.

* Sat Apr 28 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2.6-2
- rebuilt with current environment.

* Mon Dec 13 2010 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2.6-1
- new upstream release.

* Fri Jul 10 2009 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 2.2.4-1
- initial build.

