X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=php-pecl-APC.spec;h=f77a6f22cd14fcd0e16d8faceeebca22d6d172d8;hb=49f76edab4304131406bc00003c169b7114275ed;hp=9f869024d8c12b08fcd12463e9dbb46c018e9cfd;hpb=92a922c4166a5522e63a9fd4c248b07c1ca2ff2a;p=packages%2Fphp-pecl-APC.git diff --git a/php-pecl-APC.spec b/php-pecl-APC.spec index 9f86902..f77a6f2 100644 --- a/php-pecl-APC.spec +++ b/php-pecl-APC.spec @@ -1,28 +1,24 @@ # TODO -# - segfaults CLI # - maybe related: # - http://pecl.php.net/bugs/bug.php?id=7141 -# - http://pecl.php.net/bugs/bug.php?id=7261 -# - http://pecl.php.net/bugs/bug.php?id=7762 -%define _modname APC -%define _status stable -%define _sysconfdir /etc/php -%define extensionsdir %(php-config --extension-dir 2>/dev/null) -Summary: %{_modname} - Alternative PHP Cache -Summary(pl): %{_modname} - alternatywne cache PHP -Name: php-pecl-%{_modname} -Version: 3.0.12p2 -Release: 1 -License: PHP +%define php_name php%{?php_suffix} +%define modname APC +%define status beta +Summary: %{modname} - Alternative PHP Cache +Summary(pl.UTF-8): %{modname} - alternatywne cache PHP +Name: %{php_name}-pecl-%{modname} +Version: 3.1.13 +Release: 2 +License: PHP 3.01 Group: Development/Languages/PHP -Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz -# Source0-md5: e7f1762ee95cdaaf90cf16345c6228a3 +Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz +# Source0-md5: c9e47002e3a67ebde3a6f81437c7b6e0 URL: http://pecl.php.net/package/APC/ -BuildRequires: php-devel >= 3:5.0.0 -BuildRequires: rpmbuild(macros) >= 1.322 +BuildRequires: %{php_name}-devel >= 3:5.0.0 +BuildRequires: rpmbuild(macros) >= 1.650 %{?requires_php_extension} -Requires: %{_sysconfdir}/conf.d -Obsoletes: php-pear-%{_modname} +Requires: php(core) >= 5.0.4 +Obsoletes: php-pear-%{modname} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -30,21 +26,22 @@ APC is the Alternative PHP Cache. It was conceived of to provide a free, open, and robust framework for caching and optimizing PHP intermediate code. -In PECL status of this package is: %{_status}. +In PECL status of this package is: %{status}. -%description -l pl -APC to alternatywne cache PHP. W wyobra¿eniach mia³o dostarczaæ -wolnodostêpny, otwarty i potê¿ny szkielet do buforowania i -optymalizowania kodu po¶redniego PHP. +%description -l pl.UTF-8 +APC to alternatywne cache PHP. W wyobrażeniach miało dostarczać +wolnodostępny, otwarty i potężny szkielet do buforowania i +optymalizowania kodu pośredniego PHP. -To rozszerzenie ma w PECL status: %{_status}. +To rozszerzenie ma w PECL status: %{status}. %prep -%setup -q -c +%setup -qc +mv %{modname}-%{version}/* . -cat <<'EOF' > %{_modname}.ini -; Enable %{_modname} extension module -extension=%{_modname}.so +cat <<'EOF' > %{modname}.ini +; Enable %{modname} extension module +extension=%{modname}.so apc.enabled=1 ;apc.optimization=0 ;apc.shm_segments=1 @@ -60,42 +57,32 @@ apc.enabled=1 ;apc.enable_cli=0 EOF - %build -cd %{_modname}-%{version} phpize %configure \ - --%{!?debug:dis}%{?debug:en}able-debug \ + --%{!?debug:dis}%{?debug:en}able-apc-debug \ --enable-apc-mmap %{__make} %install rm -rf $RPM_BUILD_ROOT -install -D %{_modname}-%{version}/modules/apc.so $RPM_BUILD_ROOT%{extensionsdir}/%{_modname}.so - -# we install APC.ini for all handlers but CLI and CGI -install -d $RPM_BUILD_ROOT%{_sysconfdir}/{cgi-fcgi,conf,apache2handler}.d -cp -a %{_modname}.ini $RPM_BUILD_ROOT%{_sysconfdir}/cgi-fcgi.d/%{_modname}.ini -cp -a %{_modname}.ini $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini -cp -a %{_modname}.ini $RPM_BUILD_ROOT%{_sysconfdir}/apache2handler.d/%{_modname}.ini +install -D modules/apc.so $RPM_BUILD_ROOT%{php_extensiondir}/%{modname}.so +install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d +cp -a %{modname}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini %clean rm -rf $RPM_BUILD_ROOT %post -[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart -[ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart +%php_webserver_restart %postun if [ "$1" = 0 ]; then - [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart - [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart + %php_webserver_restart fi %files %defattr(644,root,root,755) -%doc %{_modname}-%{version}/{CHANGELOG,INSTALL,NOTICE} -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cgi-fcgi.d/%{_modname}.ini -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache2handler.d/%{_modname}.ini -%attr(755,root,root) %{extensionsdir}/%{_modname}.so +%doc CHANGELOG INSTALL NOTICE apc.php +%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini +%attr(755,root,root) %{php_extensiondir}/%{modname}.so