1 |
unnilennium |
1.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_Slovenia |
4 |
unnilennium |
1.2 |
%define name php-pear-Date-Holidays-Slovenia |
5 |
|
|
%define version 0.1.2 |
6 |
|
|
%define release 2 |
7 |
|
|
|
8 |
|
|
Name: %{name} |
9 |
|
|
Version: %{version} |
10 |
|
|
Release: %{release}%{?dist} |
11 |
unnilennium |
1.1 |
Summary: Driver based class to calculate holidays in Slovenia |
12 |
|
|
License: PHP License |
13 |
|
|
Group: Development/Libraries |
14 |
|
|
Source0: http://pear.php.net/get/Date_Holidays_Slovenia-%{version}.tgz |
15 |
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) |
16 |
|
|
URL: http://pear.php.net/package/Date_Holidays_Slovenia |
17 |
|
|
|
18 |
|
|
BuildRequires: php-pear(PEAR) >= 1.4.7 |
19 |
|
|
Requires: php-pear(Date_Holidays) >= 0.18.0 |
20 |
|
|
Requires: php-pear(PEAR) >= 1.4.0b1 |
21 |
|
|
Provides: php-pear(%{pear_name}) = %{version} |
22 |
|
|
|
23 |
|
|
#BuildRequires: PEAR::PEAR >= 1.4.7 |
24 |
|
|
#Requires: PEAR::Date_Holidays >= 0.18.0 |
25 |
|
|
#Requires: PEAR::PEAR >= 1.4.0b1 |
26 |
|
|
|
27 |
|
|
BuildArch: noarch |
28 |
|
|
|
29 |
|
|
%description |
30 |
|
|
Date_Holidays helps you calculate the dates and titles of holidays and |
31 |
|
|
other special celebrations. This is the driver for calculating holidays in |
32 |
|
|
Slovenia. |
33 |
|
|
|
34 |
|
|
%prep |
35 |
|
|
%setup -c -T |
36 |
|
|
pear -v -c pearrc \ |
37 |
|
|
-d php_dir=%{peardir} \ |
38 |
|
|
-d doc_dir=/docs \ |
39 |
|
|
-d bin_dir=%{_bindir} \ |
40 |
|
|
-d data_dir=%{peardir}/data \ |
41 |
|
|
-d test_dir=%{peardir}/tests \ |
42 |
|
|
-d ext_dir=%{_libdir} \ |
43 |
|
|
-s |
44 |
|
|
|
45 |
|
|
%build |
46 |
|
|
|
47 |
|
|
%install |
48 |
|
|
rm -rf %{buildroot} |
49 |
|
|
pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0} |
50 |
|
|
|
51 |
|
|
# Clean up unnecessary files |
52 |
|
|
rm pearrc |
53 |
brianr |
1.3 |
rm -rf %{buildroot}/%{peardir}/.filemap |
54 |
|
|
rm -rf %{buildroot}/%{peardir}/.lock |
55 |
unnilennium |
1.1 |
rm -rf %{buildroot}/%{peardir}/.registry |
56 |
|
|
rm -rf %{buildroot}%{peardir}/.channels |
57 |
brianr |
1.3 |
rm -rf %{buildroot}/%{xmldir}/.filemap |
58 |
|
|
rm -rf %{buildroot}/%{xmldir}/.lock |
59 |
unnilennium |
1.2 |
rm -rf %{buildroot}/%{xmldir}/.registry |
60 |
|
|
rm -rf %{buildroot}/%{xmldir}/.channels |
61 |
|
|
if [[ -f %{buildroot}%{xmldir}/.depdb ]] ;then |
62 |
brianr |
1.3 |
rm -rf %{buildroot}%{xmldir}/.depdb |
63 |
unnilennium |
1.2 |
fi |
64 |
|
|
if [[ -f %{buildroot}{xmldir}/.depdblock ]] ;then |
65 |
brianr |
1.3 |
rm -rf %{buildroot}%{xmldir}/.depdblock |
66 |
unnilennium |
1.2 |
fi |
67 |
unnilennium |
1.1 |
|
68 |
|
|
|
69 |
|
|
# Install XML package description |
70 |
|
|
mkdir -p %{buildroot}%{xmldir} |
71 |
|
|
tar -xzf %{SOURCE0} package.xml |
72 |
|
|
cp -p package.xml %{buildroot}%{xmldir}/Date_Holidays_Slovenia.xml |
73 |
|
|
|
74 |
|
|
%clean |
75 |
|
|
rm -rf %{buildroot} |
76 |
|
|
|
77 |
|
|
%post |
78 |
|
|
pear install --nodeps --soft --force --register-only %{xmldir}/Date_Holidays_Slovenia.xml >/dev/null || : |
79 |
|
|
|
80 |
|
|
%postun |
81 |
|
|
if [ "$1" -eq "0" ]; then |
82 |
|
|
pear uninstall --nodeps --ignore-errors --register-only pear.php.net/Date_Holidays_Slovenia >/dev/null || : |
83 |
|
|
fi |
84 |
|
|
|
85 |
|
|
%files |
86 |
|
|
%defattr(-,root,root) |
87 |
|
|
|
88 |
|
|
%{peardir}/* |
89 |
|
|
%{xmldir}/Date_Holidays_Slovenia.xml |
90 |
|
|
|
91 |
|
|
%changelog |
92 |
unnilennium |
1.2 |
* Thu Jun 16 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.1.2-2.sme |
93 |
|
|
- importing to buildsys pear packages for Horde [SME: 9600] |
94 |
|
|
|
95 |
unnilennium |
1.1 |
* Mon Jul 22 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 0.1.2-1 |
96 |
|
|
- Original from pear-make-rpm-spec. |
97 |
|
|
|