%define modname mcache %define dirname %{modname} %define soname %{modname}.so %define inifile A39_%{modname}.ini Summary: A PHP extension providing access to memcached caching servers Name: php-%{modname} Version: 1.2.0 Release: %mkrel 0.beta10.1 Group: Development/PHP License: PHP License URL: http://www.klir.com/~johnm/php-mcache/ Source0: http://www.klir.com/~johnm/php-mcache/php-%{modname}-ext-%{version}-beta10.tar.bz2 BuildRequires: php-devel >= 5.1.0 BuildRequires: libmemcache-devel >= 1.4.0 Provides: php5-mcache Obsoletes: php5-mcache Epoch: 2 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description mcache is a PHP extension that aims to enable developers to easily and efficiently cache data to Memcached servers. Memcached is a distributed data caching system developed by Danga which aims to reduce load on central bottlenecks like RDBMS's. The mcache php extension has been developed by John McCaskey and is a wrapper around libmemcache. Both Sean Chittenden (author of libmemcache), and Antony Dovgal (author of the original PECL memcached extensions) deserve some of the credit for this work. Without the excellent C API of libmemcache I would have never written this extension, and likewise without the example of the PECL extension provided by Antony I would likely have taken much longer to learn how to write a PHP extension properly. The primary advantage to using this mcache extension over other PHP extensions is speed, and functionality. Previously several PHP memcache API's have existed. Several of these are very good feature-wise, but very slow due to native PHP implementation. The PECL extension has excellent speed (although not as good as mcache), but does not support multiple servers. Users have been forced to choose between speed and functionality. With the introduction of this new extension that is no longer the case. Furthermore, because this extension is based off libmemcache it will easily benefit from any testing, bug fixes, or enhancements made to the underlying library. %prep %setup -q -n php-%{modname}-ext-%{version}-beta10 %build #%{_usrsrc}/php-devel/buildext mcache "mcache.c" \ # "-lmemcache" "-DCOMPILE_DL_MCACHE" phpize %configure2_5x --with-libdir=%{_lib} \ --with-%{modname}=shared,%{_prefix} %make mv modules/*.so . %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_libdir}/php/extensions install -d %{buildroot}%{_sysconfdir}/php.d install -m755 %{soname} %{buildroot}%{_libdir}/php/extensions/ cat > README.%{modname} << EOF The %{name} package contains a dynamic shared object (DSO) for PHP. EOF cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF extension = %{soname} EOF %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} [ "../package.xml" != "/" ] && rm -f ../package.xml %files %defattr(-,root,root) %doc README* CREDITS index.html mcache.php %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile} %attr(0755,root,root) %{_libdir}/php/extensions/%{soname} %changelog * Sun Aug 27 2006 Oden Eriksson <oeriksson@mandriva.com> 2:1.2.0-0.beta10.1 - rebuilt for php-5.1.6 * Wed Jul 26 2006 Oden Eriksson <oeriksson@mandriva.com> 1:1.2.0-3.beta10.2mdk - rebuild * Fri May 05 2006 Oden Eriksson <oeriksson@mandriva.com> 1.2.0-2.beta10.2mdk - rebuilt for php-5.1.3 * Sun Jan 15 2006 Oden Eriksson <oeriksson@mandriva.com> 1:1.2.0-1.beta10.2mdk - rebuilt against php-5.1.2 * Wed Nov 30 2005 Oden Eriksson <oeriksson@mandriva.com> 1:1.2.0-0.beta10.2mdk - rebuilt against php-5.1.1 * Sat Nov 26 2005 Oden Eriksson <oeriksson@mandriva.com> 1:1.2.0-0.beta10.1mdk - 1.2.0beta10 - drop upstream patches; P0 * Sat Nov 26 2005 Oden Eriksson <oeriksson@mandriva.com> 1:1.1.4-1mdk - rebuilt against php-5.1.0 - fix versioning * Sat Oct 01 2005 Oden Eriksson <oeriksson@mandriva.com> 5.1.0_1.1.4-0.RC1.1mdk - rebuilt against php-5.1.0RC1 * Tue Sep 06 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.5_1.1.4-1mdk - rebuilt against php-5.0.5 (Major security fixes) * Thu May 26 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.4_1.1.4-1mdk - rename the package * Sat Apr 16 2005 Oden Eriksson <oeriksson@mandriva.com> 5.0.4_1.1.4-1mdk - 5.0.4 * Sun Mar 20 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.3_1.1.4-2mdk - use the %%mkrel macro * Thu Mar 17 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.3_1.1.4-1mdk - 1.1.4 * Sat Feb 12 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.3_1.1.0-1mdk - initial Mandrakelinux package * Sat Feb 12 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_1.1.0-2mdk - rebuilt against a non hardened-php aware php lib * Fri Jan 28 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_1.1.0-1mdk - 1.1.0 * Sun Jan 23 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_1.0-1mdk - initial Mandrakelinux package