From c0faf3a1eb5a4f2e9e546334e3018e346b59daa4 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 22 Oct 2018 13:47:05 +0200 Subject: add missing scriptlets --- php-ast.spec | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/php-ast.spec b/php-ast.spec index b09dee4..5b2e46c 100644 --- a/php-ast.spec +++ b/php-ast.spec @@ -24,7 +24,7 @@ Version: 1.0.0 %if 0%{?gh_date:1} Release: 0.5.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %else -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %endif License: BSD Group: Development/Languages @@ -202,6 +202,26 @@ REPORT_EXIT_STATUS=1 \ %endif +%if 0%{?fedora} < 24 && 0%{?rhel} < 8 +# 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 -a -x %{__pecl} ] ; then + %{pecl_uninstall} %{pecl_name} >/dev/null || : +fi +%endif + + %files %{?_licensedir:%license NTS/LICENSE} %doc %{pecl_docdir}/%{pecl_name} @@ -217,6 +237,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Mon Oct 22 2018 Remi Collet - 1.0.0-2 +- add missing scriptlets + * Mon Oct 22 2018 Remi Collet - 1.0.0-1 - update to 1.0.0 -- cgit