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

Commit b1d83b5

Browse files
committed
Remove pear requirement and update scriptlets
adapted from remirepo
1 parent 6b716ce commit b1d83b5

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

SPECS/php71u-pecl-apcu-bc.spec

+22-8
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,27 @@
2323
Name: %{php}-pecl-apcu-bc
2424
Summary: APCu Backwards Compatibility Module
2525
Version: 1.0.3
26-
Release: 1.ius%{?dist}
26+
Release: 2.ius%{?dist}
2727
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
2828

2929
License: PHP
3030
Group: Development/Languages
3131
URL: https://pecl.php.net/package/%{pecl_name}
3232

3333
BuildRequires: %{php}-devel
34-
BuildRequires: pecl >= 1.10.0
3534
BuildRequires: %{php}-pecl-apcu-devel >= 5.1.2
3635

36+
BuildRequires: pear1u
37+
# explicitly require pear dependencies to avoid conflicts
38+
BuildRequires: %{php}-cli
39+
BuildRequires: %{php}-common
40+
BuildRequires: %{php}-process
41+
BuildRequires: %{php}-xml
42+
3743
Requires: php(zend-abi) = %{php_zend_api}
3844
Requires: php(api) = %{php_core_api}
3945
Requires: %{php}-pecl-apcu%{?_isa} >= 5.1.2
4046

41-
Requires(post): pecl >= 1.10.0
42-
Requires(postun): pecl >= 1.10.0
43-
4447
# provide the stock name
4548
Provides: php-pecl-apc = %{apcver}
4649
Provides: php-pecl-apc%{?_isa} = %{apcver}
@@ -182,12 +185,20 @@ popd
182185
%endif
183186

184187

185-
%post
186-
%{pecl_install} %{pecl_xmldir}/%{pecl_name}.xml >/dev/null || :
188+
%triggerin -- pear1u
189+
if [ -x %{__pecl} ]; then
190+
%{pecl_install} %{pecl_xmldir}/%{pecl_name}.xml >/dev/null || :
191+
fi
192+
193+
194+
%posttrans
195+
if [ -x %{__pecl} ]; then
196+
%{pecl_install} %{pecl_xmldir}/%{pecl_name}.xml >/dev/null || :
197+
fi
187198

188199

189200
%postun
190-
if [ $1 -eq 0 ]; then
201+
if [ $1 -eq 0 -a -x %{__pecl} ]; then
191202
%{pecl_uninstall} %{pecl_name} >/dev/null || :
192203
fi
193204

@@ -207,6 +218,9 @@ fi
207218

208219

209220
%changelog
221+
* Wed Jan 31 2018 Carl George <carl@george.computer> - 1.0.3-2.ius
222+
- Remove pear requirement and update scriptlets (adapted from remirepo)
223+
210224
* Tue Mar 21 2017 Carl George <carl.george@rackspace.com> - 1.0.3-1.ius
211225
- Port from Fedora to IUS
212226
- Install package.xml as %%{pecl_name}.xml, not %%{name}.xml

0 commit comments

Comments
 (0)