%define realname apcu (APC User Cache) %define modname apcu %define dirname %{modname} %define soname %{modname}.so %define inifile 99_%{modname}.ini Summary: The %{realname} module for PHP Name: php-%{modname} Version: 5.1.17 Release: %mkrel 1 Group: Development/PHP License: PHP License URL: http://pecl.php.net/package/APCu Source0: http://pecl.php.net/get/apcu-%{version}.tgz Source1: apcu.ini Source2: php-apcu.config.php Patch0: apcu-4.0.7-default_lock_dir.diff Patch1: apcu-4.0.7-default_config.diff BuildRequires: php-devel >= 3:7.0.0 BuildRequires: pkgconfig(libpcre) Provides: php-apc = 1:%{version} Requires: php >= 3:7.0.0 %description APCu is userland caching: APC stripped of opcode caching in preparation for the deployment of Zend OPcache as the primary solution to opcode caching in future versions of PHP. APCu has a revised and simplified codebase, by the time the PECL release is available, every part of APCu being used will have received review and where necessary or appropriate, changes. Simplifying and documenting the API of APCu completely removes the barrier to maintenance and development of APCu in the future, and additionally allows us to make optimizations not possible previously because of APC's inherent complexity. APCu only supports userland caching (and dumping) of variables, providing an upgrade path for the future. When O+ takes over, many will be tempted to use 3rd party solutions to userland caching, possibly even distributed solutions; this would be a grave error. The tried and tested APC codebase provides far superior support for local storage of PHP variables. %package admin Summary: Web admin GUI for %{realname} Group: Development/PHP Requires: %{name} Provides: php-apc-admin = 1:%{version} Obsoletes: php-apc-admin < 1:%{version} %description admin This package contains a Web admin GUI for %{realname}. To access the web GUI please open up your favourite web browser and point to: http://localhost/%{name}/ %prep %setup -q -n apcu-%{version} [ "../package*.xml" != "/" ] && mv ../package*.xml . %patch0 -p1 %patch1 -p1 cp %{SOURCE1} %{inifile} cp %{SOURCE2} php-apc.config.php %build %serverbuild phpize %configure2_5x %make_build %install install -d %{buildroot}%{_libdir}/php/extensions install -d %{buildroot}%{_sysconfdir}/%{name} install -d %{buildroot}%{_sysconfdir}/php.d install -d %{buildroot}%{_datadir}/%{name} install -d %{buildroot}/var/lib/php-apcu install -m0644 %{inifile} %{buildroot}%{_sysconfdir}/php.d/%{inifile} install -m0755 modules/apcu.so %{buildroot}%{_libdir}/php/extensions/ install -d -m 755 %{buildroot}%{webappconfdir} cat > %{buildroot}%{webappconfdir}/%{name}.conf << EOF Alias /%{name} %{_datadir}/%{name} <Directory %{_datadir}/%{name}> Require local granted ErrorDocument 403 "Access denied per %{webappconfdir}/%{name}.conf" </Directory> EOF install -m0644 apc.php %{buildroot}%{_datadir}/%{name}/index.php install -m0644 php-apc.config.php %{buildroot}%{_sysconfdir}/%{name}/config.php cat > README.urpmi << EOF The actual configuration file is /etc/php-apcu/config.php. EOF %post admin # generate random secret secret=%_get_password 46 # blowfish secret perl -pi -e "s|_PASSWORD_|$secret|g" %{_sysconfdir}/%{name}/config.php %files %doc tests INSTALL LICENSE NOTICE TECHNOTES.txt %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile} %attr(0755,root,root) %{_libdir}/php/extensions/apcu.so %attr(0755,apache,apache) /var/lib/php-apcu %files admin %doc README.urpmi %config(noreplace) %{webappconfdir}/%{name}.conf %attr(0640,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/config.php %dir %{_datadir}/%{name} %{_datadir}/%{name}/index.php %changelog * Fri Feb 08 2019 mokraemer <mokraemer> 5.1.17-1.mga7 + Revision: 1364255 - new version 5.1.17 * Sun Dec 30 2018 luigiwalser <luigiwalser> 5.1.16-1.mga7 + Revision: 1346681 - 5.1.16 * Wed Dec 12 2018 mokraemer <mokraemer> 5.1.15-2.mga7 + Revision: 1340421 - rebuild * Fri Dec 07 2018 mokraemer <mokraemer> 5.1.15-1.mga7 + Revision: 1338788 - new version 5.1.15 * Thu Nov 22 2018 mokraemer <mokraemer> 5.1.14-1.mga7 + Revision: 1333255 - new version 5.1.14 * Tue Nov 20 2018 mokraemer <mokraemer> 5.1.13-1.mga7 + Revision: 1332263 - new version 5.1.13 * Fri Oct 26 2018 mokraemer <mokraemer> 5.1.11-3.mga7 + Revision: 1326071 - updated requires * Sun Sep 23 2018 umeabot <umeabot> 5.1.11-2.mga7 + Revision: 1300208 - Mageia 7 Mass Rebuild * Tue Apr 17 2018 kekepower <kekepower> 5.1.11-1.mga7 + Revision: 1219715 - Update to version 5.1.11 - Rediffed patches * Wed Feb 28 2018 mokraemer <mokraemer> 5.1.10-1.mga7 + Revision: 1205764 - new version 5.1.10 * Tue Jan 02 2018 mokraemer <mokraemer> 5.1.9-1.mga7 + Revision: 1189575 - new versioN * Sun Dec 03 2017 mokraemer <mokraemer> 5.1.8-2.mga7 + Revision: 1180958 + rebuild (emptylog) * Mon Nov 13 2017 zezinho <zezinho> 5.1.8-1.mga7 + Revision: 1177198 - new version * Thu Feb 25 2016 oden <oden> 4.0.10-1.mga6 + Revision: 979052 - 4.0.10 (5.x is for php-7+ only) - 5.1.3 * Fri Feb 12 2016 umeabot <umeabot> 4.0.7-3.mga6 + Revision: 958271 - Mageia 6 Mass Rebuild + oden <oden> - rebuild * Wed Jan 07 2015 oden <oden> 4.0.7-1.mga5 + Revision: 808929 - imported package php-apcu * Wed Jan 07 2015 Oden Eriksson <oeriksson@mandriva.com> 4.0.7-1 - inital Mageia package (slight fedora import)