1 |
%define peardir /usr/share/pear |
%define peardir /usr/share/pear |
2 |
%define xmldir /var/lib/pear |
%define xmldir /var/lib/pear |
3 |
|
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}} |
4 |
|
%{!?__pear: %global __pear %{_bindir}/pear} |
5 |
|
%global pear_name Horde_ActiveSync |
6 |
|
%global pear_channel pear.horde.org |
7 |
|
%define name php-horde-Horde-ActiveSync |
8 |
|
%define version 2.34.0 |
9 |
|
%define release 2 |
10 |
|
|
11 |
|
Name: %{name} |
12 |
|
Version: %{version} |
13 |
|
Release: %{release}%{?dist} |
14 |
Summary: PEAR: Horde ActiveSync Server Library |
Summary: PEAR: Horde ActiveSync Server Library |
|
Name: php-horde-Horde-ActiveSync |
|
|
Version: 2.34.0 |
|
|
Release: 1%{?dist} |
|
15 |
License: GPL-2.0 |
License: GPL-2.0 |
16 |
Group: Development/Libraries |
Group: Development/Libraries |
17 |
Source0: http://pear.horde.org/get/Horde_ActiveSync-%{version}.tgz |
Source0: http://pear.horde.org/get/Horde_ActiveSync-%{version}.tgz |
19 |
URL: http://pear.horde.org/package/Horde_ActiveSync |
URL: http://pear.horde.org/package/Horde_ActiveSync |
20 |
BuildRequires: php-pear(PEAR) >= 1.4.7 |
BuildRequires: php-pear(PEAR) >= 1.4.7 |
21 |
BuildRequires: php-channel(pear.horde.org) |
BuildRequires: php-channel(pear.horde.org) |
22 |
Requires: Horde_Role >= 1.0.0 |
Requires: php-horde-Horde_Role >= 1.0.0 |
23 |
Requires: Horde_Compress >= 2.0.0 |
Requires: php-horde-Horde_Compress >= 2.0.0 |
24 |
Requires: Horde_Compress < 3.0.0alpha1 |
Requires: php-horde-Horde_Compress < 3.0.0alpha1 |
25 |
Requires: Horde_Date >= 2.0.0 |
Requires: php-horde-Horde_Date >= 2.0.0 |
26 |
Requires: Horde_Date < 3.0.0alpha1 |
Requires: php-horde-Horde_Date < 3.0.0alpha1 |
27 |
Requires: Horde_Exception >= 2.0.0 |
Requires: php-horde-Horde_Exception >= 2.0.0 |
28 |
Requires: Horde_Exception < 3.0.0alpha1 |
Requires: php-horde-Horde_Exception < 3.0.0alpha1 |
29 |
Requires: Horde_Icalendar >= 2.0.0 |
Requires: php-horde-Horde_Icalendar >= 2.0.0 |
30 |
Requires: Horde_Icalendar < 3.0.0alpha1 |
Requires: php-horde-Horde_Icalendar < 3.0.0alpha1 |
31 |
Requires: Horde_Mapi >= 1.0.0 |
Requires: php-horde-Horde_Mapi >= 1.0.0 |
32 |
Requires: Horde_Mapi < 2.0.0alpha1 |
Requires: php-horde-Horde_Mapi < 2.0.0alpha1 |
33 |
Requires: Horde_Mime >= 2.0.0 |
Requires: php-horde-Horde_Mime >= 2.0.0 |
34 |
Requires: Horde_Mime < 3.0.0alpha1 |
Requires: php-horde-Horde_Mime < 3.0.0alpha1 |
35 |
Requires: Horde_Stream >= 1.4.0 |
Requires: php-horde-Horde_Stream >= 1.4.0 |
36 |
Requires: Horde_Stream < 2.0.0alpha1 |
Requires: php-horde-Horde_Stream < 2.0.0alpha1 |
37 |
Requires: Horde_Support >= 2.0.0 |
Requires: php-horde-Horde_Support >= 2.0.0 |
38 |
Requires: Horde_Support < 3.0.0alpha1 |
Requires: php-horde-Horde_Support < 3.0.0alpha1 |
39 |
Requires: Horde_Util >= 2.0.0 |
Requires: php-horde-Horde_Util >= 2.0.0 |
40 |
Requires: Horde_Util < 3.0.0alpha1 |
Requires: php-horde-Horde_Util < 3.0.0alpha1 |
41 |
Requires: php-pear(PEAR) >= 1.7.0 |
Requires: php-pear(PEAR) >= 1.7.0 |
42 |
Requires: php-channel(pear.horde.org) |
Requires: php-channel(pear.horde.org) |
43 |
BuildArch: noarch |
BuildArch: noarch |
44 |
|
BuildRequires: php-horde-Horde-Role |
45 |
|
BuildRequires: gettext |
46 |
|
# To run unit tests |
47 |
|
#BuildRequires: php-phpunit-PHPUnit |
48 |
|
#BuildRequires: php-pear(%{pear_channel}/Horde_Date) >= 2.0.0 |
49 |
|
#BuildRequires: php-pear(%{pear_channel}/Horde_Http) >= 2.0.0 |
50 |
|
#BuildRequires: php-pear(%{pear_channel}/Horde_Serialize) >= 2.0.0 |
51 |
|
#BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 |
52 |
|
#BuildRequires: php-pear(%{pear_channel}/Horde_Url) >= 2.0.0 |
53 |
|
|
54 |
|
|
55 |
Provides: %{name} = %{version} |
Provides: %{name} = %{version} |
56 |
|
|
58 |
Libraries for implementing an ActiveSync server. |
Libraries for implementing an ActiveSync server. |
59 |
|
|
60 |
%prep |
%prep |
61 |
%setup -c -T |
%setup -q -c |
62 |
pear -v -c pearrc \ |
|
63 |
-d php_dir=%{peardir} \ |
cd %{pear_name}-%{version} |
64 |
-d doc_dir=%{pear_docdir} \ |
|
65 |
-d bin_dir=%{_bindir} \ |
# Don't install .po and .pot files |
66 |
-d data_dir=%{peardir}/data \ |
# Remove checksum for .mo, as we regenerate them |
67 |
-d test_dir=%{peardir}/tests \ |
sed -e '/%{pear_name}.po/d' \ |
68 |
-d ext_dir=%{_libdir} \ |
-e '/Horde_Other.po/d' \ |
69 |
-d horde_dir=%{pear_hordedir} \ |
-e '/%{pear_name}.mo/s/md5sum="[^"]*"//' \ |
70 |
-s |
../package.xml >%{name}.xml |
71 |
|
touch -r ../package.xml %{name}.xml |
72 |
|
|
73 |
|
|
74 |
%build |
%build |
75 |
|
cd %{pear_name}-%{version} |
76 |
|
|
77 |
%install |
# Regenerate the locales |
78 |
rm -rf %{buildroot} |
for po in $(find locale -name \*.po) |
79 |
pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0} |
do |
80 |
|
msgfmt $po -o $(dirname $po)/$(basename $po .po).mo |
81 |
# Clean up unnecessary files |
done |
|
rm pearrc |
|
|
rm %{buildroot}/%{peardir}/.filemap |
|
|
rm %{buildroot}/%{peardir}/.lock |
|
|
rm -rf %{buildroot}/%{peardir}/.registry |
|
|
rm -rf %{buildroot}%{peardir}/.channels |
|
|
rm %{buildroot}%{peardir}/.depdb |
|
|
rm %{buildroot}%{peardir}/.depdblock |
|
82 |
|
|
|
#mv %{buildroot}/docs . |
|
83 |
|
|
84 |
|
%install |
85 |
|
cd %{pear_name}-%{version} |
86 |
|
%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml |
87 |
|
|
88 |
|
# Clean up unnecessary files |
89 |
|
rm -rf %{buildroot}%{pear_metadir}/.??* |
90 |
|
|
91 |
# Install XML package description |
# Install XML package description |
92 |
mkdir -p %{buildroot}%{xmldir} |
mkdir -p %{buildroot}%{pear_xmldir} |
93 |
tar -xzf %{SOURCE0} package.xml |
install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} |
94 |
cp -p package.xml %{buildroot}%{xmldir}/Horde_ActiveSync.xml |
|
95 |
|
# Locales |
96 |
|
for loc in locale/{??,??_??} |
97 |
|
do |
98 |
|
lang=$(basename $loc) |
99 |
|
test -d %{buildroot}%{pear_datadir}/%{pear_name}/$loc \ |
100 |
|
&& echo "%%lang(${lang%_*}) %{pear_datadir}/%{pear_name}/$loc" |
101 |
|
done | tee ../%{pear_name}.lang |
102 |
|
|
103 |
|
|
104 |
|
%check |
105 |
|
cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g) |
106 |
|
#%{_bindir}/phpunit --verbose . |
107 |
|
|
108 |
|
#if which php70; then |
109 |
|
# php70 %{_bindir}/phpunit --verbose . |
110 |
|
#fi |
111 |
|
|
|
%clean |
|
|
rm -rf %{buildroot} |
|
112 |
|
|
113 |
%post |
%post |
114 |
pear install --nodeps --soft --force --register-only %{xmldir}/Horde_ActiveSync.xml >/dev/null || : |
%{__pear} install --nodeps --soft --force --register-only \ |
115 |
|
%{pear_xmldir}/%{name}.xml >/dev/null || : |
116 |
|
|
117 |
%postun |
%postun |
118 |
if [ "$1" -eq "0" ]; then |
if [ $1 -eq 0 ] ; then |
119 |
pear uninstall --nodeps --ignore-errors --register-only pear.horde.org/Horde_ActiveSync >/dev/null || : |
%{__pear} uninstall --nodeps --ignore-errors --register-only \ |
120 |
|
%{pear_channel}/%{pear_name} >/dev/null || : |
121 |
fi |
fi |
122 |
|
|
123 |
%files |
|
124 |
%defattr(-,root,root) |
%files -f %{pear_name}.lang |
125 |
#%doc docs/Horde_ActiveSync/* |
%doc %{pear_docdir}/%{pear_name} |
126 |
%{peardir}/* |
%{pear_xmldir}/%{name}.xml |
127 |
%{xmldir}/Horde_ActiveSync.xml |
#%dir %{pear_phpdir}/Horde/Service |
128 |
|
#%{pear_phpdir}/Horde/Service/ActiveSync |
129 |
|
#%{pear_phpdir}/Horde/Service/ActiveSync.php |
130 |
|
%dir %{pear_datadir}/%{pear_name} |
131 |
|
%dir %{pear_datadir}/%{pear_name}/locale |
132 |
|
%{pear_testdir}/%{pear_name} |
133 |
|
#%{pear_hordedir}/themes |
134 |
|
#%dir /usr/share/pear-data/Horde_ActiveSync |
135 |
|
#%dir /usr/share/pear-data/Horde_ActiveSync/migration/ |
136 |
|
/usr/share/pear-data/Horde_ActiveSync/migration/* |
137 |
|
/usr/share/pear/Horde/* |
138 |
|
#/usr/share/pear/Horde/ActiveSync/* |
139 |
|
|
140 |
%changelog |
%changelog |
141 |
|
* Thu Jun 16 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.34.0-2.sme |
142 |
|
- new spec file to build in SME buildsys |
143 |
|
- inspired from Remi Collet php-horde-Service-Weather |
144 |
|
- [SME: 9602] |
145 |
|
|
146 |
* Tue Jun 7 2016 John H. Bennett III <bennettj@johnbennettservices.com> - 2.34.0-1 |
* Tue Jun 7 2016 John H. Bennett III <bennettj@johnbennettservices.com> - 2.34.0-1 |
147 |
- Updated to 2.33.3 |
- Updated to 2.33.3 |
148 |
|
|