1 |
%define peardir %(pear config-get php_dir 2> /dev/null || echo %{_datadir}/pear) |
2 |
%define xmldir /var/lib/pear |
3 |
%global pear_name Auth_SASL2 |
4 |
|
5 |
Summary: Abstraction of various SASL mechanism responses |
6 |
Name: php-pear-Auth-SASL2 |
7 |
Version: 0.1.0 |
8 |
Release: 2%{?dist} |
9 |
License: BSD |
10 |
Group: Development/Libraries |
11 |
Source0: http://pear.php.net/get/Auth_SASL2-%{version}.tgz |
12 |
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) |
13 |
URL: http://pear.php.net/package/Auth_SASL2 |
14 |
|
15 |
BuildRequires: php-pear(PEAR) >= 1.4.7 |
16 |
Provides: php-pear(%{pear_name}) = %{version} |
17 |
|
18 |
#BuildRequires: PEAR::PEAR >= 1.4.7 |
19 |
|
20 |
BuildArch: noarch |
21 |
|
22 |
%description |
23 |
Provides code to generate responses to common SASL mechanisms, including: |
24 |
- Digest-MD5 |
25 |
- Cram-MD5 |
26 |
- Plain |
27 |
- Anonymous |
28 |
- Login (Pseudo mechanism) |
29 |
- SCRAM |
30 |
|
31 |
%prep |
32 |
%setup -c -T |
33 |
pear -v -c pearrc \ |
34 |
-d php_dir=%{peardir} \ |
35 |
-d doc_dir=/docs \ |
36 |
-d bin_dir=%{_bindir} \ |
37 |
-d data_dir=%{peardir}/data \ |
38 |
-d test_dir=%{peardir}/tests \ |
39 |
-d ext_dir=%{_libdir} \ |
40 |
-s |
41 |
|
42 |
%build |
43 |
|
44 |
%install |
45 |
rm -rf %{buildroot} |
46 |
pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0} |
47 |
|
48 |
# Clean up unnecessary files |
49 |
rm pearrc |
50 |
rm %{buildroot}/%{peardir}/.filemap |
51 |
rm %{buildroot}/%{peardir}/.lock |
52 |
rm -rf %{buildroot}/%{peardir}/.registry |
53 |
rm -rf %{buildroot}%{peardir}/.channels |
54 |
rm %{buildroot}%{peardir}/.depdb |
55 |
rm %{buildroot}%{peardir}/.depdblock |
56 |
|
57 |
|
58 |
|
59 |
# Install XML package description |
60 |
mkdir -p %{buildroot}%{xmldir} |
61 |
tar -xzf %{SOURCE0} package.xml |
62 |
cp -p package.xml %{buildroot}%{xmldir}/Auth_SASL2.xml |
63 |
|
64 |
%clean |
65 |
rm -rf %{buildroot} |
66 |
|
67 |
%post |
68 |
pear install --nodeps --soft --force --register-only %{xmldir}/Auth_SASL2.xml >/dev/null || : |
69 |
|
70 |
%postun |
71 |
if [ "$1" -eq "0" ]; then |
72 |
pear uninstall --nodeps --ignore-errors --register-only pear.php.net/Auth_SASL2 >/dev/null || : |
73 |
fi |
74 |
|
75 |
%files |
76 |
%defattr(-,root,root) |
77 |
|
78 |
%{peardir}/* |
79 |
%{xmldir}/Auth_SASL2.xml |
80 |
|
81 |
%changelog |
82 |
* Mon May 6 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 0.1.0-2 |
83 |
- updated spec file requires section, and left original info remarked. |
84 |
|
85 |
* Sun May 5 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 0.1.0-1 |
86 |
- Original from pear-make-rpm-spec. |
87 |
|
88 |
|