1 |
%define peardir %(pear config-get php_dir 2> /dev/null || echo %{_datadir}/pear) |
2 |
%define xmldir /var/lib/pear |
3 |
%global pear_name Date_Holidays_Germany |
4 |
|
5 |
Summary: Driver based class to calculate holidays in Germany |
6 |
Name: php-pear-Date-Holidays-Germany |
7 |
Version: 0.1.2 |
8 |
Release: 1%{?dist} |
9 |
License: PHP License |
10 |
Group: Development/Libraries |
11 |
Source0: http://pear.php.net/get/Date_Holidays_Germany-%{version}.tgz |
12 |
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) |
13 |
URL: http://pear.php.net/package/Date_Holidays_Germany |
14 |
|
15 |
BuildRequires: php-pear(PEAR) >= 1.4.7 |
16 |
Requires: php-pear(Date_Holidays) >= 0.18.0 |
17 |
Requires: php-pear(PEAR) >= 1.4.0b1 |
18 |
Provides: php-pear(%{pear_name}) = %{version} |
19 |
|
20 |
#BuildRequires: PEAR::PEAR >= 1.4.7 |
21 |
#Requires: PEAR::Date_Holidays >= 0.18.0 |
22 |
#Requires: PEAR::PEAR >= 1.4.0b1 |
23 |
|
24 |
BuildArch: noarch |
25 |
|
26 |
%description |
27 |
Date_Holidays helps you calculate the dates and titles of holidays and |
28 |
other special celebrations. This is the driver for calculating holidays in |
29 |
Germany. |
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}/Date_Holidays_Germany.xml |
63 |
|
64 |
%clean |
65 |
rm -rf %{buildroot} |
66 |
|
67 |
%post |
68 |
pear install --nodeps --soft --force --register-only %{xmldir}/Date_Holidays_Germany.xml >/dev/null || : |
69 |
|
70 |
%postun |
71 |
if [ "$1" -eq "0" ]; then |
72 |
pear uninstall --nodeps --ignore-errors --register-only pear.php.net/Date_Holidays_Germany >/dev/null || : |
73 |
fi |
74 |
|
75 |
%files |
76 |
%defattr(-,root,root) |
77 |
|
78 |
%{peardir}/* |
79 |
%{xmldir}/Date_Holidays_Germany.xml |
80 |
|
81 |
%changelog |
82 |
* Mon Jul 22 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 0.1.2-1 |
83 |
- Original from pear-make-rpm-spec. |
84 |
|