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