diff options
-rw-r--r-- | php-pecl-rar.spec | 47 |
1 files changed, 34 insertions, 13 deletions
diff --git a/php-pecl-rar.spec b/php-pecl-rar.spec index 15108f4..d4f4eb0 100644 --- a/php-pecl-rar.spec +++ b/php-pecl-rar.spec @@ -7,9 +7,6 @@ # Please, preserve the changelog entries # %{?scl: %scl_package php-pecl-rar} -%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} -%{!?__pecl: %global __pecl %{_bindir}/pecl} -%{!?__php: %global __php %{_bindir}/php} %global with_zts 0%{?__ztsphp:1} %global pecl_name rar @@ -22,7 +19,7 @@ Summary: PHP extension for reading RAR archives Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 3.0.2 -Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Release: 4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: PHP and Freeware with further limitations Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -32,16 +29,16 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear -Requires(post): %{__pecl} -Requires(postun): %{__pecl} 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_name} = %{version} -Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} +Provides: %{?scl_prefix}php-%{pecl_name} = %{version} +Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} +Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} # Other third party repo stuff @@ -71,11 +68,18 @@ PHP extension for reading RAR archives using bundled unRAR library. Documentation: http://php.net/rar +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. + %prep %setup -q -c mv %{pecl_name}-%{version} NTS +# Don't install/register tests +sed -e 's/role="test"/role="src"/' \ + %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -i package.xml + cd NTS %if 0%{?rhel} == 5 @@ -146,14 +150,24 @@ do done -%post -%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +%if 0%{?fedora} < 24 +# when pear installed alone, after us +%triggerin -- %{?scl_prefix}php-pear +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi +# posttrans as pear can be installed after us +%posttrans +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi %postun -if [ $1 -eq 0 ] ; then +if [ $1 -eq 0 -a -x %{__pecl} ] ; then %{pecl_uninstall} %{pecl_name} >/dev/null || : fi +%endif %check @@ -193,6 +207,8 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license NTS/unrar/LICENSE.txt} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} @@ -205,6 +221,11 @@ rm -rf %{buildroot} %changelog +* Tue Mar 8 2016 Remi Collet <remi@fedoraproject.org> - 3.0.2-4 +- adapt for F24 +- drop runtime dependency on pear, new scriptlets +- fix license management + * Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 3.0.2-3.1 - Fedora 21 SCL mass rebuild @@ -217,4 +238,4 @@ rm -rf %{buildroot} * Mon Oct 14 2013 Remi Collet <remi@fedoraproject.org> - 3.0.2-1 - initial package, version 3.0.2 (stable) - bundled unrar to version 4.2.4 -- doc in pecl doc_dir
\ No newline at end of file +- doc in pecl doc_dir |