1 |
%define peardir %(pear config-get php_dir 2> /dev/null || echo %{_datadir}/pear) |
2 |
%define xmldir /var/lib/pear |
3 |
%global pear_name Crypt_Blowfish |
4 |
|
5 |
Summary: Allows for quick two-way blowfish encryption without requiring the Mcrypt PHP extension |
6 |
Name: php-pear-Crypt-Blowfish |
7 |
Version: 1.0.1 |
8 |
Release: 2%{?dist} |
9 |
License: PHP |
10 |
Group: Development/Libraries |
11 |
Source0: http://pear.php.net/get/Crypt_Blowfish-%{version}.tgz |
12 |
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) |
13 |
URL: http://pear.php.net/package/Crypt_Blowfish |
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 |
This package allows you to prefore two-way blowfish on the fly using only |
24 |
PHP. This package does not require the Mcrypt PHP extension to work. |
25 |
|
26 |
|
27 |
%prep |
28 |
%setup -c -T |
29 |
pear -v -c pearrc \ |
30 |
-d php_dir=%{peardir} \ |
31 |
-d doc_dir=/docs \ |
32 |
-d bin_dir=%{_bindir} \ |
33 |
-d data_dir=%{peardir}/data \ |
34 |
-d test_dir=%{peardir}/tests \ |
35 |
-d ext_dir=%{_libdir} \ |
36 |
-s |
37 |
|
38 |
%build |
39 |
|
40 |
%install |
41 |
rm -rf %{buildroot} |
42 |
pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0} |
43 |
|
44 |
# Clean up unnecessary files |
45 |
rm pearrc |
46 |
rm %{buildroot}/%{peardir}/.filemap |
47 |
rm %{buildroot}/%{peardir}/.lock |
48 |
rm -rf %{buildroot}/%{peardir}/.registry |
49 |
rm -rf %{buildroot}%{peardir}/.channels |
50 |
rm %{buildroot}%{peardir}/.depdb |
51 |
rm %{buildroot}%{peardir}/.depdblock |
52 |
|
53 |
|
54 |
|
55 |
# Install XML package description |
56 |
mkdir -p %{buildroot}%{xmldir} |
57 |
tar -xzf %{SOURCE0} package.xml |
58 |
cp -p package.xml %{buildroot}%{xmldir}/Crypt_Blowfish.xml |
59 |
|
60 |
%clean |
61 |
rm -rf %{buildroot} |
62 |
|
63 |
%post |
64 |
pear install --nodeps --soft --force --register-only %{xmldir}/Crypt_Blowfish.xml >/dev/null || : |
65 |
|
66 |
%postun |
67 |
if [ "$1" -eq "0" ]; then |
68 |
pear uninstall --nodeps --ignore-errors --register-only pear.php.net/Crypt_Blowfish >/dev/null || : |
69 |
fi |
70 |
|
71 |
%files |
72 |
%defattr(-,root,root) |
73 |
|
74 |
%{peardir}/* |
75 |
%{xmldir}/Crypt_Blowfish.xml |
76 |
|
77 |
%changelog |
78 |
* Mon May 6 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 1.0.1-2 |
79 |
- updated spec file requires section, and left original info remarked. |
80 |
|
81 |
* Sun May 5 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 1.0.1-1 |
82 |
- Original from pear-make-rpm-spec. |
83 |
|