summaryrefslogtreecommitdiffstats
path: root/php-pecl-zip.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-10-24 12:11:15 +0200
committerRemi Collet <fedora@famillecollet.com>2013-10-24 12:11:15 +0200
commit881e45767d4a455d832a8bc004a54807c83e9503 (patch)
tree4c37840a8bb76cf1b95ca18276c41dda4f075562 /php-pecl-zip.spec
parent58617d92220c734553e34f7bc42df4dcc1527932 (diff)
- upstream patch, don't use any libzip private struct
- drop LICENSE_libzip when system version is used - always build ZTS extension
Diffstat (limited to 'php-pecl-zip.spec')
-rw-r--r--php-pecl-zip.spec27
1 files changed, 12 insertions, 15 deletions
diff --git a/php-pecl-zip.spec b/php-pecl-zip.spec
index fd2db02..32d69ca 100644
--- a/php-pecl-zip.spec
+++ b/php-pecl-zip.spec
@@ -12,13 +12,12 @@
%else
%global with_libzip 0
%endif
-%global with_zts 0%{?__ztsphp:1}
Summary: A ZIP archive management extension
Summary(fr): Une extension de gestion des ZIP
Name: php-pecl-zip
Version: 1.12.2
-Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
%if %{with_libzip}
License: PHP
%else
@@ -30,6 +29,8 @@ URL: http://pecl.php.net/package/zip
Source: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Patch0: %{pecl_name}-upstream.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: php-devel
%if %{with_libzip}
@@ -66,10 +67,12 @@ Zip est une extension pour créer et lire les archives au format ZIP.
%setup -c -q
cd %{pecl_name}-%{version}
+%patch0 -p1
%if %{with_libzip}
-# delete bundled libzip to ensure it is not used (except zipint.h)
-rm lib/*.c
+sed -e '/LICENSE_libzip/d' -i ../package.xml
+# delete bundled libzip to ensure it is not used
+rm -r lib
%endif
cd ..
@@ -79,10 +82,8 @@ cat >%{pecl_name}.ini << 'EOF'
extension=%{pecl_name}.so
EOF
-%if %{with_zts}
: Duplicate sources tree for ZTS build
cp -pr %{pecl_name}-%{version} %{pecl_name}-zts
-%endif
%build
@@ -97,7 +98,6 @@ cd %{pecl_name}-%{version}
make %{?_smp_mflags}
-%if %{with_zts}
cd ../%{pecl_name}-zts
%{_bindir}/zts-phpize
%configure \
@@ -108,7 +108,6 @@ cd ../%{pecl_name}-zts
--with-php-config=%{_bindir}/zts-php-config
make %{?_smp_mflags}
-%endif
%install
@@ -120,10 +119,8 @@ install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_inidir}/%{pecl_name}.ini
# Install XML package description
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-%if %{with_zts}
make -C %{pecl_name}-zts install INSTALL_ROOT=%{buildroot}
install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{pecl_name}.ini
-%endif
# Test & Documentation
cd %{pecl_name}-%{version}
@@ -151,7 +148,6 @@ TEST_PHP_EXECUTABLE=%{_bindir}/php \
%{_bindir}/php \
run-tests.php
-%if %{with_zts}
cd ../%{pecl_name}-zts
: minimal load test of ZTS extension
%{_bindir}/zts-php --no-php-ini \
@@ -166,7 +162,6 @@ NO_INTERACTION=1 \
TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \
%{_bindir}/zts-php \
run-tests.php
-%endif
%clean
@@ -190,14 +185,16 @@ fi
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{pecl_name}.ini
%{php_extdir}/%{pecl_name}.so
-
-%if %{with_zts}
%config(noreplace) %{php_ztsinidir}/%{pecl_name}.ini
%{php_ztsextdir}/%{pecl_name}.so
-%endif
%changelog
+* Thu Oct 24 2013 Remi Collet <remi@fedoraproject.org> 1.12.2-2
+- upstream patch, don't use any libzip private struct
+- drop LICENSE_libzip when system version is used
+- always build ZTS extension
+
* Wed Oct 23 2013 Remi Collet <remi@fedoraproject.org> 1.12.2-1
- update to 1.12.2
- drop merged patches