[php-pecl-apc] update to latest snapshot

Remi Collet remi at fedoraproject.org
Wed Apr 17 13:56:32 UTC 2013


commit 32ecc32569fa08e8d872120a0941ac5f10848f9a
Author: Remi Collet <remi at fedoraproject.org>
Date:   Wed Apr 17 15:56:25 2013 +0200

    update to latest snapshot

 php-pecl-apc.spec |   79 +++++++++++++++++++++++++++++------------------------
 sources           |    2 +-
 2 files changed, 44 insertions(+), 37 deletions(-)
---
diff --git a/php-pecl-apc.spec b/php-pecl-apc.spec
index e6dde72..d53527b 100644
--- a/php-pecl-apc.spec
+++ b/php-pecl-apc.spec
@@ -1,17 +1,20 @@
-%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}}
+%{!?php_inidir:  %{expand: %%global php_inidir  %{_sysconfdir}/php.d}}
+%{!?php_incldir: %{expand: %%global php_incldir %{_includedir}/php}}
+%{!?__php:       %{expand: %%global __php       %{_bindir}/php}}
+%{!?__pecl:      %{expand: %%global __pecl      %{_bindir}/pecl}}
 
 %global pecl_name APC
-%global svnrev    329724
-# TODO rev >= 329725 have opcache default on (so need to be fixed)
+%global svnrev    329913
+%global with_zts  0%{?__ztsphp:1}
 
 Summary:       APC caches and optimizes PHP intermediate code
 Name:          php-pecl-apc
 Version:       3.1.15
-Release:       0.2.svn%{svnrev}%{?dist}
+Release:       0.3.svn%{svnrev}%{?dist}
 License:       PHP
 Group:         Development/Languages
 URL:           http://pecl.php.net/package/APC
-# svn export -r  329724 http://svn.php.net/repository/pecl/apc/trunk APC-3.1.15
+# svn export -r  329913 http://svn.php.net/repository/pecl/apc/trunk APC-3.1.15
 # tar czf APC-3.1.15-dev.tgz APC-3.1.15
 Source0:       http://pecl.php.net/get/APC-%{version}%{?svnrev:-dev}.tgz
 Source1:       apc.ini
@@ -73,18 +76,24 @@ configuration, available on http://localhost/apc-panel/
 %setup -q -c
 %if 0%{?svnrev}
 sed -e "/release/s/%{version}/%{version}dev/" \
-    -e "/date/s/2013-??-??/2013-03-10/" \
+    -e "/date/s/2013-??-??/2013-03-25/" \
     APC-%{version}/package.xml >package.xml
-grep date package.xml
 %endif
 
 cd APC-%{version}
 
-%if 0%{?__isa_bits}
-# port number to allow 32/64 build at same time
-port=$(expr %{__isa_bits} + 8900)
-sed -e "/PHP_CLI_SERVER_PORT/s/8964/$port/" \
-    -i tests/server_test.inc
+%if "%{php_version}" > "5.5"
+# With PHP > 5.5, disable
+sed -e '/apc.enable_opcode_cache/s/1/0/' \
+    -i php_apc.c
+sed -e '/apc.enable_opcode_cache/s/1/0/' \
+    %{SOURCE1} > ../apc.ini
+%else
+# With PHP < 5.4, enable
+sed -e '/apc.enable_opcode_cache/s/0/1/' \
+    -i php_apc.c
+sed -e '/apc.enable_opcode_cache/s/0/1/' \
+    %{SOURCE1} > ../apc.ini
 %endif
 
 # Sanity check, really often broken
@@ -95,7 +104,10 @@ if test "x${extver}" != "x%{version}%{?svnrev:-dev}"; then
 fi
 cd ..
 
-%if 0%{?__ztsphp:1}
+# Fix the charset of NOTICE
+iconv -f iso-8859-1 -t utf8 APC-%{version}/NOTICE >NOTICE
+
+%if %{with_zts}
 # duplicate for ZTS build
 cp -pr APC-%{version} APC-%{version}-zts
 %endif
@@ -107,7 +119,7 @@ cd APC-%{version}
 %configure --enable-apc-mmap --with-php-config=%{_bindir}/php-config
 make %{?_smp_mflags}
 
-%if 0%{?__ztsphp:1}
+%if %{with_zts}
 cd ../APC-%{version}-zts
 %{_bindir}/zts-phpize
 %configure --enable-apc-mmap --with-php-config=%{_bindir}/zts-php-config
@@ -117,21 +129,14 @@ make %{?_smp_mflags}
 
 %install
 # Install the NTS stuff
-pushd APC-%{version}
-make install INSTALL_ROOT=%{buildroot}
+make install -C APC-%{version} INSTALL_ROOT=%{buildroot}
 
-# Fix the charset of NOTICE
-iconv -f iso-8859-1 -t utf8 NOTICE >NOTICE.utf8
-mv NOTICE.utf8 NOTICE
-popd
-install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/php.d/apc.ini
+install -D -m 644 apc.ini %{buildroot}%{php_inidir}/apc.ini
 
+%if %{with_zts}
 # Install the ZTS stuff
-%if 0%{?__ztsphp:1}
-pushd APC-%{version}-zts
-make install INSTALL_ROOT=%{buildroot}
-popd
-install -D -m 644 %{SOURCE1} %{buildroot}%{php_ztsinidir}/apc.ini
+make install -C APC-%{version}-zts INSTALL_ROOT=%{buildroot}
+install -D -m 644 apc.ini %{buildroot}%{php_ztsinidir}/apc.ini
 %endif
 
 # Install the package XML file
@@ -161,7 +166,7 @@ NO_INTERACTION=1 \
 REPORT_EXIT_STATUS=0 \
 %{_bindir}/php -n run-tests.php
 
-%if 0%{?__ztsphp:1}
+%if %{with_zts}
 cd ../%{pecl_name}-%{version}-zts
 ln -sf %{php_ztsextdir}/dom.so modules/
 
@@ -173,10 +178,10 @@ REPORT_EXIT_STATUS=0 \
 %endif
 %else
 : minimal load test
-%{_bindir}/php -n \
+%{__php} -n \
    -d extension_dir=%{pecl_name}-%{version}/modules \
    -d extension=apc.so -m | grep apc
-%if 0%{?__ztsphp:1}
+%if %{with_zts}
 %{__ztsphp}    -n \
    -d extension_dir=%{pecl_name}-%{version}-zts/modules \
    -d extension=apc.so -m | grep apc
@@ -195,22 +200,21 @@ fi
 
 
 %files
-%doc APC-%{version}/TECHNOTES.txt APC-%{version}/CHANGELOG APC-%{version}/LICENSE
-%doc APC-%{version}/NOTICE        APC-%{version}/TODO      APC-%{version}/apc.php
-%doc APC-%{version}/INSTALL
-%config(noreplace) %{_sysconfdir}/php.d/apc.ini
+%doc APC-%{version}/{TECHNOTES.txt,CHANGELOG,LICENSE,INSTALL,TODO,apc.php}
+%doc NOTICE
+%config(noreplace) %{php_inidir}/apc.ini
 %{php_extdir}/apc.so
 %{pecl_xmldir}/%{name}.xml
 
-%if 0%{?__ztsphp:1}
+%if %{with_zts}
 %{php_ztsextdir}/apc.so
 %config(noreplace) %{php_ztsinidir}/apc.ini
 %endif
 
 %files devel
-%{_includedir}/php/ext/apc
+%{php_incldir}/ext/apc
 
-%if 0%{?__ztsphp:1}
+%if %{with_zts}
 %{php_ztsincldir}/ext/apc
 %endif
 
@@ -223,6 +227,9 @@ fi
 
 
 %changelog
+* Wed Apr 17 2013 Remi Collet <remi at fedoraproject.org> - 3.1.15-0.3.svn329913
+- update to latest snapshot
+
 * Fri Mar 22 2013 Remi Collet <rcollet at redhat.com> 3.1.15-0.2.svn329724
 - rebuild for http://fedoraproject.org/wiki/Features/Php55
 
diff --git a/sources b/sources
index 7cfe114..c0cb9f7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-bf050a4e3769e5f68545b0c61ccced04  APC-3.1.15-dev.tgz
+cab4cbbd120d4a9a34f594e71754494a  APC-3.1.15-dev.tgz


More information about the scm-commits mailing list