summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-couchbase.spec39
1 files changed, 27 insertions, 12 deletions
diff --git a/php-pecl-couchbase.spec b/php-pecl-couchbase.spec
index fea4ed2..8a2c286 100644
--- a/php-pecl-couchbase.spec
+++ b/php-pecl-couchbase.spec
@@ -8,9 +8,6 @@
#
%{?scl: %scl_package php-pecl-couchbase}
-%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
-%{!?__pecl: %global __pecl %{_bindir}/pecl}
-%{!?__php: %global __php %{_bindir}/php}
%global pecl_name couchbase
%global with_zts 0%{?__ztsphp:1}
@@ -27,7 +24,7 @@
Summary: Couchbase Server PHP extension
Name: %{?scl_prefix}php-pecl-couchbase
Version: 1.2.2
-Release: 4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1
+Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP
Group: Development/Languages
URL: pecl.php.net/package/couchbase
@@ -47,17 +44,17 @@ BuildRequires: %{?scl_prefix}php-json
BuildRequires: fastlz-devel
%endif
-Requires(post): %{__pecl}
-Requires(postun): %{__pecl}
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-pecl-igbinary%{?_isa}
%{?_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
@@ -100,6 +97,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
mv %{pecl_name}-%{version} NTS
+%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
+
cd NTS
%patch0 -p1 -b .fastlz
%if %{with_fastlz}
@@ -188,14 +187,24 @@ ln -sf %{php_ztsextdir}/{json,igbinary}.so ZTS/modules/
%endif
-%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
%files
@@ -215,6 +224,11 @@ fi
%changelog
+* Tue Mar 8 2016 Remi Collet <remi@fedoraproject.org> - 1.2.2-5
+- adapt for F24
+- drop runtime dependency on pear, new scriptlets
+- fix license management
+
* Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 1.2.2-4.1
- Fedora 21 SCL mass rebuild
@@ -250,3 +264,4 @@ fi
* Fri Mar 22 2013 Remi Collet <remi@fedoraproject.org> - 1.1.14-1
- initial package
+