Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Commit

Permalink
Remove pear requirement and update scriptlets
Browse files Browse the repository at this point in the history
adapted from remirepo
  • Loading branch information
carlwgeorge committed Jan 31, 2018
1 parent 5d78801 commit 356f9a3
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions SPECS/php71u-pecl-oauth.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,27 @@

Name: %{php}-pecl-%{pecl_name}
Version: 2.0.2
Release: 1.ius%{?dist}
Release: 2.ius%{?dist}
Summary: PHP OAuth consumer extension
Group: Development/Languages
License: BSD
URL: https://pecl.php.net/package/oauth
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz

BuildRequires: %{php}-devel
BuildRequires: pecl >= 1.10.0
BuildRequires: libcurl-devel
BuildRequires: pcre-devel

BuildRequires: pear1u
# explicitly require pear dependencies to avoid conflicts
BuildRequires: %{php}-cli
BuildRequires: %{php}-common
BuildRequires: %{php}-process
BuildRequires: %{php}-xml

Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}

Requires(post): pecl >= 1.10.0
Requires(postun): pecl >= 1.10.0

# provide the stock name
Provides: php-pecl-%{pecl_name} = %{version}
Provides: php-pecl-%{pecl_name}%{?_isa} = %{version}
Expand Down Expand Up @@ -123,12 +126,20 @@ done
%endif


%post
%{pecl_install} %{pecl_xmldir}/%{pecl_name}.xml >/dev/null || :
%triggerin -- pear1u
if [ -x %{__pecl} ]; then
%{pecl_install} %{pecl_xmldir}/%{pecl_name}.xml >/dev/null || :
fi


%posttrans
if [ -x %{__pecl} ]; then
%{pecl_install} %{pecl_xmldir}/%{pecl_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

Expand All @@ -148,6 +159,9 @@ fi


%changelog
* Wed Jan 31 2018 Carl George <carl@george.computer> - 2.0.2-2.ius
- Remove pear requirement and update scriptlets (adapted from remirepo)

* Wed May 31 2017 Ben Harper <ben.harper@rackspace.com> - 2.0.2-1.ius
- Port from Fedora

Expand Down

0 comments on commit 356f9a3

Please sign in to comment.