1 |
%define peardir /usr/share/pear |
2 |
%define xmldir /var/lib/pear |
3 |
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}} |
4 |
%{!?__pear: %global __pear %{_bindir}/pear} |
5 |
%global pear_name timeobjects |
6 |
%global pear_channel pear.horde.org |
7 |
%define name timeobjects |
8 |
%define version 2.1.2 |
9 |
%define release 3 |
10 |
|
11 |
Name: %{name} |
12 |
Version: %{version} |
13 |
Release: %{release}%{?dist} |
14 |
Summary: PEAR: Horde timeobjects application |
15 |
License: BSD-2-Clause |
16 |
Group: Development/Libraries |
17 |
Source0: http://pear.horde.org/get/timeobjects-%{version}.tgz |
18 |
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) |
19 |
URL: http://pear.horde.org/package/timeobjects |
20 |
BuildRequires: php-pear(PEAR) >= 1.4.7 |
21 |
BuildRequires: php-channel(pear.horde.org) |
22 |
Requires: php-horde-Horde-Role >= 1.0.0 |
23 |
Requires: php-horde-Horde-Core >= 2.0.0 |
24 |
Requires: php-horde-Horde-Core < 3.0.0alpha1 |
25 |
Requires: php-horde-Horde-Date >= 2.0.0 |
26 |
Requires: php-horde-Horde-Date < 3.0.0alpha1 |
27 |
Requires: php-horde-Horde-Exception >= 2.0.0 |
28 |
Requires: php-horde-Horde-Exception < 3.0.0alpha1 |
29 |
Requires: php-horde-Horde-Url >= 2.0.0 |
30 |
Requires: php-horde-Horde-Url < 3.0.0alpha1 |
31 |
Requires: php-horde-Horde-Util >= 2.0.0 |
32 |
Requires: php-horde-Horde-Util < 3.0.0alpha1 |
33 |
Requires: php-pear(PEAR) >= 1.7.0 |
34 |
Requires: php-channel(pear.horde.org) |
35 |
BuildArch: noarch |
36 |
BuildRequires: php-horde-Horde-Role |
37 |
BuildRequires: php-channel-horde |
38 |
Requires: php-channel-horde |
39 |
BuildRequires: gettext |
40 |
Provides: %{name} = %{version} |
41 |
|
42 |
%description |
43 |
The timeobjects application doesn't have an interface but provides streams |
44 |
of events to any applications that can consume them, notably the Horde |
45 |
calendar application. It contains drivers for facebook events and weather |
46 |
forecasts and can easily be extended by custom drivers. |
47 |
|
48 |
%prep |
49 |
%setup -q -c |
50 |
cd %{pear_name}-%{version} |
51 |
|
52 |
# Don't install .po and .pot files |
53 |
# Remove checksum for .mo, as we regenerate them |
54 |
sed -e '/%{pear_name}.po/d' \ |
55 |
-e '/Horde_Other.po/d' \ |
56 |
-e '/%{pear_name}.mo/s/md5sum="[^"]*"//' \ |
57 |
../package.xml >%{name}.xml |
58 |
touch -r ../package.xml %{name}.xml |
59 |
|
60 |
|
61 |
%build |
62 |
cd %{pear_name}-%{version} |
63 |
|
64 |
# Regenerate the locales |
65 |
for po in $(find locale -name \*.po) |
66 |
do |
67 |
msgfmt $po -o $(dirname $po)/$(basename $po .po).mo |
68 |
done |
69 |
|
70 |
|
71 |
%install |
72 |
cd %{pear_name}-%{version} |
73 |
%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml |
74 |
|
75 |
# Clean up unnecessary files |
76 |
rm -rf %{buildroot}%{pear_metadir}/.??* |
77 |
|
78 |
# Install XML package description |
79 |
mkdir -p %{buildroot}%{pear_xmldir} |
80 |
install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} |
81 |
|
82 |
# Locales |
83 |
for loc in locale/{??,??_??} |
84 |
do |
85 |
lang=$(basename $loc) |
86 |
test -d %{buildroot}%{pear_datadir}/%{pear_name}/$loc \ |
87 |
&& echo "%%lang(${lang%_*}) %{pear_datadir}/%{pear_name}/$loc" |
88 |
done | tee ../%{pear_name}.lang |
89 |
|
90 |
|
91 |
|
92 |
%post |
93 |
%{__pear} install --nodeps --soft --force --register-only \ |
94 |
%{pear_xmldir}/%{name}.xml >/dev/null || : |
95 |
|
96 |
%postun |
97 |
if [ $1 -eq 0 ] ; then |
98 |
%{__pear} uninstall --nodeps --ignore-errors --register-only \ |
99 |
%{pear_channel}/%{pear_name} >/dev/null || : |
100 |
fi |
101 |
|
102 |
|
103 |
%files -f %{pear_name}.lang |
104 |
%defattr(-,root,root) |
105 |
%doc %{pear_hordedir} |
106 |
%{pear_xmldir}/timeobjects.xml |
107 |
%doc %{pear_docdir}/%{pear_name} |
108 |
|
109 |
%changelog |
110 |
* Fri Jun 17 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.1.2-3.sme |
111 |
- new spec file to build in SME buildsys |
112 |
- inspired from Remi Collet php-horde-Service-Weather |
113 |
- [SME: 9601] |
114 |
- add gettext as buildrequires (bump 3) |
115 |
|
116 |
* Tue Apr 5 2016 John H. Bennett III <bennettj@johnbennettservices.com> - 2.1.2-1 |
117 |
- Update to 2.1.2 |
118 |
|
119 |
* Sun Feb 7 2016 John H. Bennett III <bennettj@johnbennettservices.com> - 2.1.1-1 |
120 |
- Update to 2.1.1 |
121 |
|
122 |
* Tue May 13 2014 John H. Bennett III <bennettj@johnbennettservices.com> - 2.1.0-1 |
123 |
- Update to 2.1.0 |
124 |
|
125 |
* Fri Jun 21 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 2.0.4-1 |
126 |
- Update to 2.0.4 |
127 |
|
128 |
* Tue Jun 4 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 2.0.3-1 |
129 |
- Initial release for SME Server |
130 |
- Original build from pear make-rpm-spec |
131 |
|