summaryrefslogtreecommitdiffstats
path: root/php-pecl-inotify.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-inotify.spec')
-rw-r--r--php-pecl-inotify.spec38
1 files changed, 25 insertions, 13 deletions
diff --git a/php-pecl-inotify.spec b/php-pecl-inotify.spec
index c036e82..744863a 100644
--- a/php-pecl-inotify.spec
+++ b/php-pecl-inotify.spec
@@ -1,4 +1,4 @@
-# spec file for php-pecl-inotify
+# remirepo spec file for php-pecl-inotify
#
# Copyright (c) 2013-2016 Remi Collet
# License: CC-BY-SA
@@ -22,7 +22,7 @@
Summary: Inotify
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 0.1.6
-Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1
+Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}.2
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
@@ -32,8 +32,6 @@ 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}}
@@ -42,6 +40,8 @@ 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
@@ -69,6 +69,8 @@ Obsoletes: php56w-pecl-%{pecl_name}
%description
The inotify extension allows to use inotify functions in a PHP script.
+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
@@ -76,6 +78,8 @@ mv %{pecl_name}-%{version} NTS
sed -e '/inotify.php/s/role="php"/role="doc"/' \
-e '/tail.php/s/role="php"/role="doc"/' \
+ -e 's/role="test"/role="src"/' \
+ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
cd NTS
@@ -140,22 +144,27 @@ make -C ZTS install INSTALL_ROOT=%{buildroot}
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
-# Test & Documentation
+# Documentation
cd NTS
-for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i
-done
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
-%post
-%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
+# 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
@@ -198,7 +207,6 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc %{pecl_docdir}/%{pecl_name}
-%doc %{pecl_testdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -210,7 +218,11 @@ rm -rf %{buildroot}
%changelog
-* Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 0.8.0-1.1
+* Sun Jan 29 2016 Remi Collet <remi@fedoraproject.org> - 0.1.6-5.2
+- don't install/register tests
+- drop runtime dependency on pear, new scriptlets
+
+* Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 0.1.6-5.1
- Fedora 21 SCL mass rebuild
* Tue Aug 26 2014 Remi Collet <rcollet@redhat.com> - 0.1.6-5