summaryrefslogtreecommitdiffstats
path: root/php-pecl-haru.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-haru.spec')
-rw-r--r--php-pecl-haru.spec44
1 files changed, 31 insertions, 13 deletions
diff --git a/php-pecl-haru.spec b/php-pecl-haru.spec
index a3bfed5..1333279 100644
--- a/php-pecl-haru.spec
+++ b/php-pecl-haru.spec
@@ -7,9 +7,6 @@
# Please, preserve the changelog entries
#
%{?scl: %scl_package php-pecl-haru}
-%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
-%{!?__pecl: %global __pecl %{_bindir}/pecl}
-%{!?__php: %global __php %{_bindir}/php}
%global pecl_name haru
%global with_zts 0%{?__ztsphp:1}
@@ -22,7 +19,7 @@
Summary: Haru PDF functions
Name: %{?scl_prefix}php-pecl-haru
Version: 1.0.4
-Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1
+Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP
Group: Development/Languages
@@ -37,16 +34,16 @@ BuildRequires: libharu-devel
BuildRequires: libpng-devel
BuildRequires: zlib-devel
-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
@@ -79,11 +76,15 @@ generating PDF files.
Documentation : http://www.php.net/haru
+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 -c -q
mv %{pecl_name}-%{version} NTS
+%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
+
# Create configuration file
cat >%{ini_name} << 'EOF'
; Enable %{pecl_name} extension module
@@ -149,14 +150,24 @@ done
rm -rf %{buildroot}
-%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
@@ -175,6 +186,7 @@ fi
%files
%defattr(-, root, root, -)
+%{?_licensedir:%license NTS/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -188,6 +200,11 @@ fi
%changelog
+* Tue Mar 8 2016 Remi Collet <remi@fedoraproject.org> - 1.0.4-6
+- adapt for F24
+- drop runtime dependency on pear, new scriptlets
+- fix license management
+
* Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 1.0.4-5.1
- Fedora 21 SCL mass rebuild
@@ -214,4 +231,5 @@ fi
* Thu Feb 02 2012 Remi Collet <remi@fedoraproject.org> - 1.0.3-1
- Initial RPM
- https://bugs.php.net/60958 - Please Provides LICENSE file
-- https://bugs.php.net/60959 - Version 1.0.3 reports as 1.0.1 \ No newline at end of file
+- https://bugs.php.net/60959 - Version 1.0.3 reports as 1.0.1
+