[php-pecl-apc] latest snapshot (upstream bugfix) and enable ZTS build

Remi Collet remi at fedoraproject.org
Thu Mar 15 18:12:35 UTC 2012


commit 36e1363428775d35545b68c5c544e63d40915c5b
Author: remi <fedora at famillecollet.com>
Date:   Thu Mar 15 19:11:35 2012 +0100

    latest snapshot (upstream bugfix) and enable ZTS build

 .gitignore        |    1 +
 php-pecl-apc.spec |  104 ++++++++++++++++++++++++++++++++++------------------
 sources           |    2 +-
 3 files changed, 70 insertions(+), 37 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5a87603..84f5f77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
 /APC-3.1.9.tgz
 /apc-svn316786.tgz
 /apc-svn322617.tgz
+/apc-svn324146.tgz
diff --git a/php-pecl-apc.spec b/php-pecl-apc.spec
index 788d45f..7c25670 100644
--- a/php-pecl-apc.spec
+++ b/php-pecl-apc.spec
@@ -1,10 +1,9 @@
 %{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}}
 
 %global php_zendabiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP Extension => //p') | tail -1)
-%global php_version %((echo 0; php-config --version 2>/dev/null) | tail -1)
-%global pecl_name APC
 
-%global svnver 322617
+%global pecl_name APC
+%global svnver    324146
 
 Summary:       APC caches and optimizes PHP intermediate code
 Name:          php-pecl-apc
@@ -13,10 +12,10 @@ License:       PHP
 Group:         Development/Languages
 URL:           http://pecl.php.net/package/APC
 %if 0%{?svnver}
-# svn export -r 322617 https://svn.php.net/repository/pecl/apc/trunk apc-svn322617
-# tar czf apc-svn322617.tgz apc-svn322617
+# svn export -r 324146 https://svn.php.net/repository/pecl/apc/trunk apc-svn324146
+# tar czf apc-svn324146.tgz apc-svn324146
 Source:        apc-svn%{svnver}.tgz
-Release:       5.svn%{svnver}%{?dist}
+Release:       6.svn%{svnver}%{?dist}
 %else
 Release:       3%{?dist}
 Source:        http://pecl.php.net/get/APC-%{version}.tgz
@@ -32,13 +31,8 @@ Requires(postun): %{__pecl}
 Requires:      php(zend-abi) = %{php_zend_api}
 Requires:      php(api) = %{php_core_api}
 %else
-%if "%{rhel}" == "5"
 # RHEL5 where we have php-common providing the Zend ABI the "old way"
 Requires:      php-zend-abi = %{php_zendabiver}
-%else
-# RHEL4 where we have no php-common and nothing providing the Zend ABI...
-Requires:      php = %{php_version}
-%endif
 %endif
 Provides:      php-pecl(%{pecl_name}) = %{version}
 
@@ -46,10 +40,10 @@ Requires(post): %{__pecl}
 Requires(postun): %{__pecl}
 
 # RPM 4.8
-%{?filter_provides_in: %filter_provides_in %{php_extdir}/.*\.so$}
+%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
 %{?filter_setup}
 # RPM 4.9
-%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{php_extdir}/.*\\.so$
+%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{_libdir}/.*\\.so$
 
 
 %description
@@ -78,31 +72,13 @@ mv apc-svn%{svnver} APC-%{version}
 # Check than upstream version is correct, http://pecl.php.net/bugs/19590
 grep '"%{version}"' APC-%{version}/php_apc.h || exit 1
 
-
-%build
-cd APC-%{version}
-%{_bindir}/phpize
-%configure --enable-apc-mmap --with-php-config=%{_bindir}/php-config
-make %{?_smp_mflags}
-
-
-%install
-rm -rf %{buildroot}
-pushd APC-%{version}
-make install INSTALL_ROOT=%{buildroot}
-
-# Fix the charset of NOTICE
-iconv -f iso-8859-1 -t utf8 NOTICE >NOTICE.utf8
-mv NOTICE.utf8 NOTICE
-
-popd
-
-# Install the package XML file
-install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
+%if 0%{?__ztsphp:1}
+# duplicate for ZTS build
+cp -pr APC-%{version} APC-%{version}-zts
+%endif
 
 # Drop in the bit of configuration
-%{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d
-%{__cat} > %{buildroot}%{_sysconfdir}/php.d/apc.ini << 'EOF'
+cat > apc.ini << 'EOF'
 ; Enable apc extension module
 extension = apc.so
 
@@ -176,12 +152,57 @@ apc.preload_path
 EOF
 
 
+%build
+cd APC-%{version}
+%{_bindir}/phpize
+%configure --enable-apc-mmap --with-php-config=%{_bindir}/php-config
+make %{?_smp_mflags}
+
+%if 0%{?__ztsphp:1}
+cd ../APC-%{version}-zts
+%{_bindir}/zts-phpize
+%configure --enable-apc-mmap --with-php-config=%{_bindir}/zts-php-config
+make %{?_smp_mflags}
+%endif
+
+
+%install
+rm -rf %{buildroot}
+# Install the NTS stuff
+pushd APC-%{version}
+make install 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 apc.ini %{buildroot}%{_sysconfdir}/php.d/apc.ini
+
+# Install the ZTS stuff
+%if 0%{?__ztsphp:1}
+pushd APC-%{version}-zts
+make install INSTALL_ROOT=%{buildroot}
+popd
+install -D -m 644 apc.ini %{buildroot}%{php_ztsinidir}/apc.ini
+%endif
+
+# Install the package XML file
+install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
+
+
 %check
 cd %{pecl_name}-%{version}
 TEST_PHP_EXECUTABLE=%{_bindir}/php %{_bindir}/php run-tests.php \
     -n -q -d extension_dir=modules \
     -d extension=apc.so
 
+%if 0%{?__ztsphp:1}
+cd ../%{pecl_name}-%{version}-zts
+TEST_PHP_EXECUTABLE=%{__ztsphp} %{__ztsphp} run-tests.php \
+    -n -q -d extension_dir=modules \
+    -d extension=apc.so
+%endif
+
 
 %if 0%{?pecl_install:1}
 %post
@@ -209,12 +230,23 @@ rm -rf %{buildroot}
 %config(noreplace) %{_sysconfdir}/php.d/apc.ini
 %{php_extdir}/apc.so
 %{pecl_xmldir}/%{name}.xml
+%if 0%{?__ztsphp:1}
+%{php_ztsextdir}/apc.so
+%config(noreplace) %{php_ztsinidir}/apc.ini
+%endif
 
 %files devel
 %{_includedir}/php/ext/apc
+%if 0%{?__ztsphp:1}
+%{php_ztsincldir}/ext/apc
+%endif
 
 
 %changelog
+* Thu Mar 15 2012 Remi Collet <remi at fedoraproject.org> - 3.1.9-6.svn324146
+- new SVN snapshot
+- enable ZTS build
+
 * Sat Feb 18 2012 Remi Collet <remi at fedoraproject.org> - 3.1.9-5.svn322617
 - rebuild against php 5.4.0RC8 (without zend-signals)
 - pull latest SVN changes
diff --git a/sources b/sources
index 0a7eb3b..506128f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-abc0718262db2c3bb7b457db890b7cc4  apc-svn322617.tgz
+2937b6ccacec30c0762f11f5e18939b5  apc-svn324146.tgz


More information about the scm-commits mailing list