|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
# RHEL / Fedora spec file for php-pecl-zip
|
|
|
|
|
# Fedora spec file for php-pecl-zip
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2013-2020 Remi Collet
|
|
|
|
|
# Copyright (c) 2013-2018 Remi Collet
|
|
|
|
|
# License: CC-BY-SA
|
|
|
|
|
# http://creativecommons.org/licenses/by-sa/4.0/
|
|
|
|
|
#
|
|
|
|
@ -14,21 +14,16 @@
|
|
|
|
|
%global with_zts 0%{?__ztsphp:1}
|
|
|
|
|
%global ini_name 40-%{pecl_name}.ini
|
|
|
|
|
|
|
|
|
|
%global upstream_version 1.18.2
|
|
|
|
|
#global upstream_prever RC6
|
|
|
|
|
|
|
|
|
|
Summary: A ZIP archive management extension
|
|
|
|
|
Summary(fr): Une extension de gestion des ZIP
|
|
|
|
|
Name: php-pecl-zip
|
|
|
|
|
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
|
|
|
|
|
Version: 1.15.3
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
License: PHP
|
|
|
|
|
URL: https://pecl.php.net/package/zip
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
URL: http://pecl.php.net/package/zip
|
|
|
|
|
|
|
|
|
|
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
|
|
|
|
|
|
|
|
|
|
# Upstream patch for test suite
|
|
|
|
|
Patch0: %{pecl_name}-tests.patch
|
|
|
|
|
Source: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
|
|
|
|
|
|
|
|
|
|
BuildRequires: php-devel
|
|
|
|
|
BuildRequires: pkgconfig(libzip) >= 1.0.0
|
|
|
|
@ -53,20 +48,17 @@ Zip est une extension pour créer et lire les archives au format ZIP.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -c -q
|
|
|
|
|
mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
|
|
|
|
|
|
|
|
|
|
# Don't install/register tests
|
|
|
|
|
sed -e 's/role="test"/role="src"/' \
|
|
|
|
|
-e '/LICENSE/s/role="doc"/role="src"/' \
|
|
|
|
|
-i package.xml
|
|
|
|
|
|
|
|
|
|
cd NTS
|
|
|
|
|
%patch0 -p1
|
|
|
|
|
|
|
|
|
|
cd %{pecl_name}-%{version}
|
|
|
|
|
# Sanity check, really often broken
|
|
|
|
|
extver=$(sed -n '/#define PHP_ZIP_VERSION/{s/.* "//;s/".*$//;p}' php5/php_zip.h)
|
|
|
|
|
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
|
|
|
|
|
: Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}.
|
|
|
|
|
if test "x${extver}" != "x%{version}%{?prever}"; then
|
|
|
|
|
: Error: Upstream extension version is ${extver}, expecting %{version}%{?prever}.
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
@ -79,12 +71,12 @@ EOF
|
|
|
|
|
|
|
|
|
|
%if %{with_zts}
|
|
|
|
|
: Duplicate sources tree for ZTS build
|
|
|
|
|
cp -pr NTS ZTS
|
|
|
|
|
cp -pr %{pecl_name}-%{version} %{pecl_name}-zts
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
cd NTS
|
|
|
|
|
cd %{pecl_name}-%{version}
|
|
|
|
|
%{_bindir}/phpize
|
|
|
|
|
%configure \
|
|
|
|
|
--with-libzip \
|
|
|
|
@ -94,7 +86,7 @@ cd NTS
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
%if %{with_zts}
|
|
|
|
|
cd ../ZTS
|
|
|
|
|
cd ../%{pecl_name}-zts
|
|
|
|
|
%{_bindir}/zts-phpize
|
|
|
|
|
%configure \
|
|
|
|
|
--with-libzip \
|
|
|
|
@ -106,26 +98,26 @@ make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
make -C NTS install INSTALL_ROOT=%{buildroot}
|
|
|
|
|
make -C %{pecl_name}-%{version} install INSTALL_ROOT=%{buildroot}
|
|
|
|
|
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
|
|
|
|
|
|
|
|
|
|
# Install XML package description
|
|
|
|
|
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
|
|
|
|
|
|
|
|
|
|
%if %{with_zts}
|
|
|
|
|
make -C ZTS install INSTALL_ROOT=%{buildroot}
|
|
|
|
|
make -C %{pecl_name}-zts install INSTALL_ROOT=%{buildroot}
|
|
|
|
|
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Documentation
|
|
|
|
|
cd NTS
|
|
|
|
|
cd %{pecl_name}-%{version}
|
|
|
|
|
for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
|
|
|
|
|
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
cd NTS
|
|
|
|
|
cd %{pecl_name}-%{version}
|
|
|
|
|
: minimal load test of NTS extension
|
|
|
|
|
%{_bindir}/php --no-php-ini \
|
|
|
|
|
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
|
|
|
|
@ -136,10 +128,10 @@ TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
|
|
|
|
|
REPORT_EXIT_STATUS=1 \
|
|
|
|
|
NO_INTERACTION=1 \
|
|
|
|
|
TEST_PHP_EXECUTABLE=%{_bindir}/php \
|
|
|
|
|
%{_bindir}/php -n run-tests.php --show-diff
|
|
|
|
|
%{_bindir}/php -n run-tests.php
|
|
|
|
|
|
|
|
|
|
%if %{with_zts}
|
|
|
|
|
cd ../ZTS
|
|
|
|
|
cd ../%{pecl_name}-zts
|
|
|
|
|
: minimal load test of ZTS extension
|
|
|
|
|
%{_bindir}/zts-php --no-php-ini \
|
|
|
|
|
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
|
|
|
|
@ -150,12 +142,12 @@ TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
|
|
|
|
|
REPORT_EXIT_STATUS=1 \
|
|
|
|
|
NO_INTERACTION=1 \
|
|
|
|
|
TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \
|
|
|
|
|
%{_bindir}/zts-php -n run-tests.php --show-diff
|
|
|
|
|
%{_bindir}/zts-php -n run-tests.php
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license NTS/LICENSE
|
|
|
|
|
%license %{pecl_name}-%{version}/LICENSE
|
|
|
|
|
%doc %{pecl_docdir}/%{pecl_name}
|
|
|
|
|
%{pecl_xmldir}/%{name}.xml
|
|
|
|
|
|
|
|
|
@ -169,12 +161,6 @@ TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu May 14 2020 Remi Collet <rcollet@redhat.com> - 1.18.2-1
|
|
|
|
|
- update to 1.18.2
|
|
|
|
|
|
|
|
|
|
* Tue May 7 2019 Remi Collet <remi@remirepo.net> - 1.15.4-1
|
|
|
|
|
- Update to 1.15.4
|
|
|
|
|
|
|
|
|
|
* Tue Jun 12 2018 Remi Collet <remi@remirepo.net> - 1.15.3-1
|
|
|
|
|
- Update to 1.15.3
|
|
|
|
|
|