1 |
%define _class UDDI |
2 |
%define _status alpha |
3 |
%define _pearname %{_class} |
4 |
|
5 |
Summary: %{_pearname} - API for PHP |
6 |
Name: php-pear-%{_pearname} |
7 |
Version: 0.2.4 |
8 |
Release: %mkrel 13 |
9 |
License: PHP License |
10 |
Group: Development/PHP |
11 |
Source0: https://pear.php.net/get/%{_pearname}-%{version}.tgz |
12 |
URL: https://pear.php.net/package/UDDI/ |
13 |
Requires(post): php-pear |
14 |
Requires(preun): php-pear |
15 |
Requires: php-pear |
16 |
BuildArch: noarch |
17 |
BuildRequires: dos2unix |
18 |
Provides: pear(UDDI.php) |
19 |
|
20 |
%description |
21 |
Implementation of Universal Description, Discovery and Integration API |
22 |
for locating and publishing Web Services in a UBR (UDDI Business |
23 |
Registry). |
24 |
|
25 |
In PEAR status of this package is: %{_status}. |
26 |
|
27 |
%prep |
28 |
|
29 |
%setup -q -c |
30 |
|
31 |
find . -type d -perm 0700 -exec chmod 755 {} \; |
32 |
find . -type f -perm 0555 -exec chmod 755 {} \; |
33 |
find . -type f -perm 0444 -exec chmod 644 {} \; |
34 |
|
35 |
for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do |
36 |
if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null |
37 |
done |
38 |
|
39 |
# strip away annoying ^M |
40 |
find -type f | grep -v ".gif" | grep -v ".png" | grep -v ".jpg" | xargs dos2unix |
41 |
|
42 |
%install |
43 |
install -d %{buildroot}%{_datadir}/pear/%{_class} |
44 |
|
45 |
install %{_pearname}-%{version}/*.php %{buildroot}%{_datadir}/pear/%{_class} |
46 |
|
47 |
install -d %{buildroot}%{_datadir}/pear/packages |
48 |
install -m0644 package.xml %{buildroot}%{_datadir}/pear/packages/%{_pearname}.xml |
49 |
|
50 |
%post |
51 |
if [ "$1" = "1" ]; then |
52 |
if [ -x %{_bindir}/pear -a -f %{_datadir}/pear/packages/%{_pearname}.xml ]; then |
53 |
%{_bindir}/pear install --nodeps -r %{_datadir}/pear/packages/%{_pearname}.xml |
54 |
fi |
55 |
fi |
56 |
if [ "$1" = "2" ]; then |
57 |
if [ -x %{_bindir}/pear -a -f %{_datadir}/pear/packages/%{_pearname}.xml ]; then |
58 |
%{_bindir}/pear upgrade -f --nodeps -r %{_datadir}/pear/packages/%{_pearname}.xml |
59 |
fi |
60 |
fi |
61 |
|
62 |
%preun |
63 |
if [ "$1" = 0 ]; then |
64 |
if [ -x %{_bindir}/pear -a -f %{_datadir}/pear/packages/%{_pearname}.xml ]; then |
65 |
%{_bindir}/pear uninstall --nodeps -r %{_pearname} |
66 |
fi |
67 |
fi |
68 |
|
69 |
%files |
70 |
%defattr(644,root,root,755) |
71 |
%doc %{_pearname}-%{version}/examples |
72 |
%{_datadir}/pear/%{_class}/*.php |
73 |
%{_datadir}/pear/packages/%{_pearname}.xml |
74 |
|
75 |
|
76 |
|
77 |
|