Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
php5
:
EL6
:
5.6.30
:
extensions
>
php-pecl-zip
> php-pecl-zip.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File php-pecl-zip.spec of Package php-pecl-zip
# remirepo spec file for php-pecl-zip # with SCL compatibility, from: # # fedora spec file for php-pecl-zip # # Copyright (c) 2013-2016 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %{?scl: %scl_package php-pecl-zip} %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name zip %if 0%{?rhel} != 5 %global with_libzip 1 %else %global with_libzip 0 %endif %if "%{php_version}" < "5.6" %global ini_name %{pecl_name}.ini %else %global ini_name 40-%{pecl_name}.ini %endif #global prever dev Summary: A ZIP archive management extension Summary(fr): Une extension de gestion des ZIP Name: %{?scl_prefix}php-pecl-zip Version: 1.13.5 Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %if %{with_libzip} License: PHP %else # Zip extension is PHP, Libzip library is BSD License: PHP and BSD %endif Group: Development/Languages URL: http://pecl.php.net/package/zip Source: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-devel %if %{with_libzip} BuildRequires: libzip-last-devel >= 1.0.0 %endif BuildRequires: zlib-devel BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} Provides: %{?scl_prefix}php-%{pecl_name} = 1:%{version}-%{release} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = 1:%{version}-%{release} %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} # Other third party repo stuff Obsoletes: php53-pecl-%{pecl_name} <= %{version} Obsoletes: php53u-pecl-%{pecl_name} <= %{version} Obsoletes: php54-pecl-%{pecl_name} <= %{version} Obsoletes: php54w-pecl-%{pecl_name} <= %{version} %if "%{php_version}" > "5.5" Obsoletes: php55u-pecl-%{pecl_name} <= %{version} Obsoletes: php55w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "5.6" Obsoletes: php56u-pecl-%{pecl_name} <= %{version} Obsoletes: php56w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.0" Obsoletes: php70u-pecl-%{pecl_name} <= %{version} Obsoletes: php70w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.1" Obsoletes: php71u-pecl-%{pecl_name} <= %{version} Obsoletes: php71w-pecl-%{pecl_name} <= %{version} %endif %endif %if "%{php_version}" > "7.0" Obsoletes: %{?scl_prefix}php-zip <= 7.0.0 %endif %if 0%{?fedora} < 20 && 0%{?rhel} < 7 # Filter private shared %{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} %{?filter_setup} %endif %description Zip is an extension to create and read zip files. %description -l fr Zip est une extension pour créer et lire les archives au format ZIP. %prep %setup -c -q # Don't install/register tests sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml mv %{pecl_name}-%{version}%{?prever} NTS cd NTS # Sanity check, really often broken extver=$(sed -n '/#define PHP_ZIP_VERSION/{s/.* "//;s/".*$//;p}' php5/php_zip.h) if test "x${extver}" != "x%{version}%{?prever}"; then : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever}. exit 1 fi %if %{with_libzip} sed -e '/LICENSE_libzip/d' -i ../package.xml # delete bundled libzip to ensure it is not used rm -r lib %endif cd .. : Create the configuration file cat >%{ini_name} << 'EOF' ; Enable ZIP extension module extension=%{pecl_name}.so EOF %if %{with_zts} : Duplicate sources tree for ZTS build cp -pr NTS ZTS %endif %build cd NTS %{_bindir}/phpize %configure \ %if %{with_libzip} --with-libzip \ %endif --with-libdir=%{_lib} \ --with-php-config=%{_bindir}/php-config make %{?_smp_mflags} %if %{with_zts} cd ../ZTS %{_bindir}/zts-phpize %configure \ %if %{with_libzip} --with-libzip \ %endif --with-libdir=%{_lib} \ --with-php-config=%{_bindir}/zts-php-config make %{?_smp_mflags} %endif %install rm -rf %{buildroot} make -C NTS install INSTALL_ROOT=%{buildroot} install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} %if %{with_zts} make -C ZTS install INSTALL_ROOT=%{buildroot} install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Documentation #cd NTS #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 ## : minimal load test of NTS extension ## %{_bindir}/php --no-php-ini \ ## --define extension_dir=modules \ ## --define extension=%{pecl_name}.so \ ## --modules | grep %{pecl_name} ## ## : upstream test suite for NTS extension ## 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 ## ## %if %{with_zts} ## cd ../ZTS ## : minimal load test of ZTS extension ## %{_bindir}/zts-php --no-php-ini \ ## --define extension_dir=modules \ ## --define extension=%{pecl_name}.so \ ## --modules | grep %{pecl_name} ## ## : upstream test suite for ZTS extension ## 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 ## %endif ## %clean rm -rf %{buildroot} %files %defattr(-, root, root, -) %{?_licensedir:%license NTS/LICENSE} ## %doc %{pecl_docdir}/%{pecl_name} %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so %if %{with_zts} %config(noreplace) %{php_ztsinidir}/%{ini_name} %{php_ztsextdir}/%{pecl_name}.so %endif %changelog