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 Horde_Service_Twitter |
6 |
%global pear_channel pear.horde.org |
7 |
%define name php-horde-Horde-Service-Twitter |
8 |
%define version 2.1.5 |
9 |
%define release 2 |
10 |
|
11 |
Name: %{name} |
12 |
Version: %{version} |
13 |
Release: %{release}%{?dist} |
14 |
Summary: PEAR: Horde Twitter client |
15 |
License: BSD-2-Clause |
16 |
Group: Development/Libraries |
17 |
Source0: http://pear.horde.org/get/Horde_Service_Twitter-%{version}.tgz |
18 |
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) |
19 |
URL: http://pear.horde.org/package/Horde_Service_Twitter |
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-Controller >= 2.0.0 |
24 |
Requires: php-horde-Horde-Controller < 3.0.0alpha1 |
25 |
Requires: php-horde-Horde-Exception >= 2.0.0 |
26 |
Requires: php-horde-Horde-Exception < 3.0.0alpha1 |
27 |
Requires: php-horde-Horde-Http >= 2.0.0 |
28 |
Requires: php-horde-Horde-Http < 3.0.0alpha1 |
29 |
Requires: php-horde-Horde-Oauth >= 2.0.0 |
30 |
Requires: php-horde-Horde-Oauth < 3.0.0alpha1 |
31 |
Requires: php-horde-Horde-Url >= 2.0.0 |
32 |
Requires: php-horde-Horde-Url < 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: gettext |
38 |
|
39 |
Provides: %{name} = %{version} |
40 |
|
41 |
%description |
42 |
Client libraries for the Twitter REST API. |
43 |
|
44 |
%prep |
45 |
%setup -q -c |
46 |
|
47 |
cd %{pear_name}-%{version} |
48 |
|
49 |
# Don't install .po and .pot files |
50 |
# Remove checksum for .mo, as we regenerate them |
51 |
sed -e '/%{pear_name}.po/d' \ |
52 |
-e '/Horde_Other.po/d' \ |
53 |
-e '/%{pear_name}.mo/s/md5sum="[^"]*"//' \ |
54 |
../package.xml >%{name}.xml |
55 |
touch -r ../package.xml %{name}.xml |
56 |
|
57 |
|
58 |
%build |
59 |
cd %{pear_name}-%{version} |
60 |
|
61 |
# Regenerate the locales |
62 |
for po in $(find locale -name \*.po) |
63 |
do |
64 |
msgfmt $po -o $(dirname $po)/$(basename $po .po).mo |
65 |
done |
66 |
|
67 |
|
68 |
%install |
69 |
cd %{pear_name}-%{version} |
70 |
%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml |
71 |
|
72 |
# Clean up unnecessary files |
73 |
rm -rf %{buildroot}%{pear_metadir}/.??* |
74 |
|
75 |
# Install XML package description |
76 |
mkdir -p %{buildroot}%{pear_xmldir} |
77 |
install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} |
78 |
|
79 |
# Locales |
80 |
for loc in locale/{??,??_??} |
81 |
do |
82 |
lang=$(basename $loc) |
83 |
test -d %{buildroot}%{pear_datadir}/%{pear_name}/$loc \ |
84 |
&& echo "%%lang(${lang%_*}) %{pear_datadir}/%{pear_name}/$loc" |
85 |
done | tee ../%{pear_name}.lang |
86 |
|
87 |
|
88 |
#%check |
89 |
#cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g) |
90 |
|
91 |
%post |
92 |
%{__pear} install --nodeps --soft --force --register-only \ |
93 |
%{pear_xmldir}/%{name}.xml >/dev/null || : |
94 |
|
95 |
%postun |
96 |
if [ $1 -eq 0 ] ; then |
97 |
%{__pear} uninstall --nodeps --ignore-errors --register-only \ |
98 |
%{pear_channel}/%{pear_name} >/dev/null || : |
99 |
fi |
100 |
|
101 |
|
102 |
%files -f %{pear_name}.lang |
103 |
%doc %{pear_docdir}/%{pear_name} |
104 |
%{pear_xmldir}/%{name}.xml |
105 |
/usr/share/pear/Horde/* |
106 |
|
107 |
%changelog |
108 |
* Fri Jun 17 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.1.5-2.sme |
109 |
- new spec file to build in SME buildsys |
110 |
- inspired from Remi Collet php-horde-Service-Weather |
111 |
- [SME: 9602] |
112 |
|
113 |
* Wed Jun 10 2015 John H. Bennett III <bennettj@johnbennettservices.com> - 2.1.5-1 |
114 |
- Updated to 2.1.5 |
115 |
|
116 |
* Sat May 2 2015 John H. Bennett III <bennettj@johnbennettservices.com> - 2.1.4-1 |
117 |
- Updated to 2.1.4 |
118 |
|
119 |
* Sat Mar 7 2015 John H. Bennett III <bennettj@johnbennettservices.com> - 2.1.3-1 |
120 |
- Updated to 2.1.3 |
121 |
|
122 |
* Sat Jan 10 2015 John H. Bennett III <bennettj@johnbennettservices.com> - 2.1.2-1 |
123 |
- Updated to 2.1.2 |
124 |
|
125 |
* Sun Jul 7 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 2.1.1-1 |
126 |
- Updated to 2.1.1 |
127 |
|
128 |
* Tue Jun 18 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 2.1.0-1 |
129 |
- Updated to 2.1.0 |
130 |
|
131 |
* Tue Jun 4 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 2.0.3-1 |
132 |
- Initial release for SME Server |
133 |
- Original build from pear make-rpm-spec |