7b9ac7c
# spec file for php-horde-Horde-Imap-Client
7b9ac7c
#
f47d724
# Copyright (c) 2012-2015 Remi Collet
7b9ac7c
# License: CC-BY-SA
35f89d8
# http://creativecommons.org/licenses/by-sa/4.0/
7b9ac7c
#
7b9ac7c
# Please, preserve the changelog entries
7b9ac7c
#
53bf590
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
271bb08
%{!?__pear:       %global __pear       %{_bindir}/pear}
53bf590
%global pear_name    Horde_Imap_Client
53bf590
%global pear_channel pear.horde.org
2b1fc83
%global with_tests   %{?_without_tests:0}%{!?_without_tests:1}
53bf590
53bf590
Name:           php-horde-Horde-Imap-Client
0c72a35
Version:        2.28.1
53bf590
Release:        1%{?dist}
53bf590
Summary:        Horde IMAP abstraction interface
53bf590
53bf590
Group:          Development/Libraries
53bf590
License:        LGPLv2
53bf590
URL:            http://pear.horde.org
53bf590
Source0:        http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
53bf590
53bf590
BuildArch:      noarch
53bf590
BuildRequires:  php(language) >= 5.3.0
53bf590
BuildRequires:  php-pear(PEAR) >= 1.7.0
53bf590
BuildRequires:  php-channel(%{pear_channel})
53bf590
BuildRequires:  gettext
2b1fc83
%if %{with_tests}
53bf590
# To run unit tests
4f97f85
BuildRequires:  php-pear(%{pear_channel}/Horde_Test) >= 2.2.7
e938ea0
BuildRequires:  php-pear(%{pear_channel}/Horde_Stream) >= 1.4.0
4ec8194
BuildRequires:  php-pear(%{pear_channel}/Horde_Mime) >= 2.5.2
8c8ab8b
BuildRequires:  php-pear(%{pear_channel}/Horde_Cache) >= 2.0.0
4f97f85
BuildRequires:  php-pear(%{pear_channel}/Horde_Pack) >= 1.0.0
2b1fc83
%endif
53bf590
53bf590
Requires(post): %{__pear}
53bf590
Requires(postun): %{__pear}
65eb81b
# From package.xml, required
53bf590
Requires:       php(language) >= 5.3.0
53bf590
Requires:       php-hash
f44769c
Requires:       php-intl
04b694b
Requires:       php-json
cbd9986
Requires:       php-pear(PEAR) >= 1.7.0
53bf590
Requires:       php-channel(%{pear_channel})
53bf590
Requires:       php-pear(%{pear_channel}/Horde_Exception) >= 2.0.0
4c41257
Requires:       php-pear(%{pear_channel}/Horde_Exception) <  3.0.0
53bf590
Requires:       php-pear(%{pear_channel}/Horde_Mail) >= 2.0.0
4c41257
Requires:       php-pear(%{pear_channel}/Horde_Mail) <  3.0.0
4ec8194
Requires:       php-pear(%{pear_channel}/Horde_Mime) >= 2.5.2
4c41257
Requires:       php-pear(%{pear_channel}/Horde_Mime) <  3.0.0
04b694b
Requires:       php-pear(%{pear_channel}/Horde_Secret) >= 2.0.0
04b694b
Requires:       php-pear(%{pear_channel}/Horde_Secret) <  3.0.0
2b1fc83
Requires:       php-pear(%{pear_channel}/Horde_Socket_Client) >= 2.0.0
2b1fc83
Requires:       php-pear(%{pear_channel}/Horde_Socket_Client) <  3
e938ea0
Requires:       php-pear(%{pear_channel}/Horde_Stream) >= 1.4.0
4c41257
Requires:       php-pear(%{pear_channel}/Horde_Stream) <  2.0.0
04b694b
Requires:       php-pear(%{pear_channel}/Horde_Stream_Filter) >= 2.0.0
04b694b
Requires:       php-pear(%{pear_channel}/Horde_Stream_Filter) <  3.0.0
b01f9bc
Requires:       php-pear(%{pear_channel}/Horde_Translation) >= 2.2.0
c4d6198
Requires:       php-pear(%{pear_channel}/Horde_Translation) <  3.0.0
53bf590
Requires:       php-pear(%{pear_channel}/Horde_Util) >= 2.0.0
4c41257
Requires:       php-pear(%{pear_channel}/Horde_Util) <  3.0.0
65eb81b
# From package.xml, optional
53bf590
Requires:       php-mbstring
53bf590
Requires:       php-pear(%{pear_channel}/Horde_Cache) >= 2.0.0
4c41257
Requires:       php-pear(%{pear_channel}/Horde_Cache) <  3.0.0
8c8ab8b
Requires:       php-pear(%{pear_channel}/Horde_Db) >= 2.0.0
4c41257
Requires:       php-pear(%{pear_channel}/Horde_Db) <  3.0.0
65eb81b
Requires:       php-pear(%{pear_channel}/Horde_Pack) >= 1.0.0
65eb81b
Requires:       php-pear(%{pear_channel}/Horde_Pack) <  2.0.0
082fee4
#Requires:       php-pear(%{pear_channel}/Horde_Stringprep) >= 1.0.0
082fee4
#Requires:       php-pear(%{pear_channel}/Horde_Stringprep) <  2.0.0
01d87f9
# From phpcompatinfo report for version 2.19.4
cbd9986
Requires:       php-date
cbd9986
Requires:       php-openssl
cbd9986
Requires:       php-pcre
cbd9986
Requires:       php-spl
8c8ab8b
# Optional and implicilyt required :
e938ea0
#   Horde_Compress_Fast, Horde_HashTable, Horde_Mongo, mongo, Horde_Support
53bf590
53bf590
Provides:       php-pear(%{pear_channel}/%{pear_name}) = %{version}
2b1fc83
Provides:       php-composer(horde/horde-imap-client) = %{version}
53bf590
53bf590
53bf590
%description
53bf590
An abstracted API interface to various IMAP4rev1 (RFC 3501) backend
53bf590
drivers.
53bf590
53bf590
53bf590
%prep
53bf590
%setup -q -c
53bf590
cd %{pear_name}-%{version}
53bf590
53bf590
# Don't install .po and .pot files
53bf590
# Remove checksum for .mo, as we regenerate them
4c60c37
sed -e '/%{pear_name}\.po/d' \
4c60c37
    -e '/%{pear_name}\.mo/s/md5sum=.*name=/name=/' \
53bf590
    ../package.xml >%{name}.xml
9b542cb
touch -r ../package.xml %{name}.xml
53bf590
53bf590
53bf590
%build
53bf590
cd %{pear_name}-%{version}
53bf590
53bf590
# Regenerate the locales
53bf590
for po in $(find locale -name \*.po)
53bf590
do
53bf590
   msgfmt $po -o $(dirname $po)/$(basename $po .po).mo
53bf590
done
53bf590
53bf590
53bf590
%install
53bf590
cd %{pear_name}-%{version}
53bf590
%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
53bf590
53bf590
# Clean up unnecessary files
53bf590
rm -rf %{buildroot}%{pear_metadir}/.??*
53bf590
53bf590
# Install XML package description
53bf590
mkdir -p %{buildroot}%{pear_xmldir}
53bf590
install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
53bf590
53bf590
# Locales
53bf590
for loc in locale/{??,??_??}
53bf590
do
53bf590
    lang=$(basename $loc)
53bf590
    test -d $loc && echo "%%lang(${lang%_*}) %{pear_datadir}/%{pear_name}/$loc"
53bf590
done | tee ../%{pear_name}.lang
53bf590
53bf590
53bf590
%check
2b1fc83
%if %{with_tests}
53bf590
cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g)
d6aaa32
%if 0%{?fedora} < 21 && 0%{?rhel} < 7
504ae15
# ignore test results with old PHPUnit
504ae15
phpunit . || exit 0
d6aaa32
%else
504ae15
phpunit .
d6aaa32
%endif
2b1fc83
%else
2b1fc83
: bootstrap build with test suite disabled
2b1fc83
%endif
53bf590
53bf590
53bf590
%post
53bf590
%{__pear} install --nodeps --soft --force --register-only \
53bf590
    %{pear_xmldir}/%{name}.xml >/dev/null || :
53bf590
53bf590
%postun
53bf590
if [ $1 -eq 0 ] ; then
53bf590
    %{__pear} uninstall --nodeps --ignore-errors --register-only \
53bf590
        %{pear_channel}/%{pear_name} >/dev/null || :
53bf590
fi
53bf590
53bf590
53bf590
%files -f %{pear_name}.lang
53bf590
%doc %{pear_docdir}/%{pear_name}
53bf590
%{pear_xmldir}/%{name}.xml
53bf590
%dir %{pear_phpdir}/Horde/Imap
53bf590
%{pear_phpdir}/Horde/Imap/Client
53bf590
%{pear_phpdir}/Horde/Imap/Client.php
53bf590
%{pear_testdir}/%{pear_name}
53bf590
%dir %{pear_datadir}/%{pear_name}
53bf590
%dir %{pear_datadir}/%{pear_name}/locale
8c8ab8b
%{pear_datadir}/%{pear_name}/migration
53bf590
53bf590
53bf590
%changelog
0c72a35
* Wed May 13 2015 Remi Collet <remi@fedoraproject.org> - 2.28.1-1
0c72a35
- Update to 2.28.1
0c72a35
35f89d8
* Tue Apr 28 2015 Remi Collet <remi@fedoraproject.org> - 2.28.0-1
35f89d8
- Update to 2.28.0
35f89d8
2b1fc83
* Tue Mar 10 2015 Remi Collet <remi@fedoraproject.org> - 2.27.0-1
2b1fc83
- Update to 2.27.0
2b1fc83
- add provides php-composer(horde/horde-imap-client)
2b1fc83
- raise dependency on Horde_Socket_Client > 2
2b1fc83
1db945a
* Tue Jan 27 2015 Remi Collet <remi@fedoraproject.org> - 2.26.1-1
1db945a
- Update to 2.26.1
1db945a
f47d724
* Wed Jan 07 2015 Remi Collet <remi@fedoraproject.org> - 2.26.0-1
f47d724
- Update to 2.26.0
f47d724
4ec8194
* Wed Dec 03 2014 Remi Collet <remi@fedoraproject.org> - 2.25.6-1
4ec8194
- Update to 2.25.6
4ec8194
- raise dependency on Horde_Mime >= 2.5.2
4ec8194
504ae15
* Tue Nov 25 2014 Remi Collet <remi@fedoraproject.org> - 2.25.5-1
504ae15
- Update to 2.25.5
504ae15
4c60c37
* Sun Nov 23 2014 Remi Collet <remi@fedoraproject.org> - 2.25.4-1
4c60c37
- Update to 2.25.4
4c60c37
- raise dependency on Horde_Mime >= 2.5.0
4c60c37
b01f9bc
* Tue Nov 11 2014 Remi Collet <remi@fedoraproject.org> - 2.25.3-1
b01f9bc
- Update to 2.25.3
b01f9bc
- raise dependency on Horde_Translation >= 2.2.0
b01f9bc
082fee4
* Tue Oct 14 2014 Remi Collet <remi@fedoraproject.org> - 2.25.2-1
082fee4
- Update to 2.25.2
082fee4
7fa718a
* Wed Sep 17 2014 Remi Collet <remi@fedoraproject.org> - 2.25.1-1
7fa718a
- Update to 2.25.1
7fa718a
f44769c
* Thu Sep 04 2014 Remi Collet <remi@fedoraproject.org> - 2.25.0-1
f44769c
- Update to 2.25.0
f44769c
- add dependency on php-intl
f44769c
63ee942
* Tue Aug 12 2014 Remi Collet <remi@fedoraproject.org> - 2.24.2-1
63ee942
- Update to 2.24.2
63ee942
a6e8264
* Mon Aug 11 2014 Remi Collet <remi@fedoraproject.org> - 2.24.1-1
a6e8264
- Update to 2.24.1
a6e8264
e587796
* Tue Aug 05 2014 Remi Collet <remi@fedoraproject.org> - 2.24.0-1
e587796
- Update to 2.24.0
e587796
9b542cb
* Wed Jul 09 2014 Remi Collet <remi@fedoraproject.org> - 2.23.2-1
9b542cb
- Update to 2.23.2
9b542cb
cce5154
* Wed Jun 18 2014 Remi Collet <remi@fedoraproject.org> - 2.23.1-1
cce5154
- Update to 2.23.1
cce5154
e629545
* Tue Jun 17 2014 Remi Collet <remi@fedoraproject.org> - 2.23.0-1
e629545
- Update to 2.23.0
e629545
0c878f0
* Sat Jun 07 2014 Remi Collet <remi@fedoraproject.org> - 2.22.0-1
0c878f0
- Update to 2.22.0
0c878f0
14da8c8
* Wed Jun 04 2014 Remi Collet <remi@fedoraproject.org> - 2.21.0-1
14da8c8
- Update to 2.21.0
14da8c8
4297d97
* Thu May 22 2014 Remi Collet <remi@fedoraproject.org> - 2.20.0-1
4297d97
- Update to 2.20.0
4297d97
0c17a13
* Wed May 14 2014 Remi Collet <remi@fedoraproject.org> - 2.19.6-1
0c17a13
- Update to 2.19.6
0c17a13
b5359cf
* Sat May 03 2014 Remi Collet <remi@fedoraproject.org> - 2.19.5-1
b5359cf
- Update to 2.19.5
b5359cf
01d87f9
* Thu Apr 24 2014 Remi Collet <remi@fedoraproject.org> - 2.19.4-1
01d87f9
- Update to 2.19.4
01d87f9
3c1c078
* Wed Apr 23 2014 Remi Collet <remi@fedoraproject.org> - 2.19.3-1
3c1c078
- Update to 2.19.3
3c1c078
e4bcfab
* Thu Apr 03 2014 Remi Collet <remi@fedoraproject.org> - 2.19.2-1
e4bcfab
- Update to 2.19.2
e4bcfab
1d9257e
* Mon Mar 17 2014 Remi Collet <remi@fedoraproject.org> - 2.19.1-1
1d9257e
- Update to 2.19.1
1d9257e
4f97f85
* Tue Mar 11 2014 Remi Collet <remi@fedoraproject.org> - 2.19.0-1
4f97f85
- Update to 2.19.0
4f97f85
- raise dependencies: Horde_Test 2.2.7, Horde_Mime 2.3.0
4f97f85
- add BR on Horde_Pack
4f97f85
6692561
* Tue Mar 04 2014 Remi Collet <remi@fedoraproject.org> - 2.18.6-1
6692561
- Update to 2.18.6
6692561
9df4086
* Tue Feb 25 2014 Remi Collet <remi@fedoraproject.org> - 2.18.3-1
9df4086
- Update to 2.18.3
9df4086
b4ebabb
* Fri Feb 14 2014 Remi Collet <remi@fedoraproject.org> - 2.18.1-1
b4ebabb
- Update to 2.18.1
b4ebabb
e938ea0
* Tue Feb 11 2014 Remi Collet <remi@fedoraproject.org> - 2.18.0-1
e938ea0
- Update to 2.18.0
e938ea0
- Raise dependencies: Horde_Stream >= 1.4.0, Horde_Translation >= 2.1.0
e938ea0
271bb08
* Wed Jan 22 2014 Remi Collet <remi@fedoraproject.org> - 2.17.1-1
271bb08
- Update to 2.17.1
271bb08
65eb81b
* Sat Jan 18 2014 Remi Collet <remi@fedoraproject.org> - 2.17.0-1
65eb81b
- Update to 2.17.0
65eb81b
- add dependency: Horde_Pack >= 1.0.0
65eb81b
- add dependency: Horde_Socket_Client >= 1.1.0
65eb81b
a1b9543
* Sat Oct 12 2013 Remi Collet <remi@fedoraproject.org> - 2.15.5-1
a1b9543
- Update to 2.15.5
a1b9543
11b5920
* Thu Oct 10 2013 Remi Collet <remi@fedoraproject.org> - 2.15.4-1
11b5920
- Update to 2.15.4
11b5920
cbd9986
* Tue Sep 17 2013 Remi Collet <remi@fedoraproject.org> - 2.15.3-1
cbd9986
- Update to 2.15.3
cbd9986
184c782
* Mon Sep 16 2013 Remi Collet <remi@fedoraproject.org> - 2.15.2-1
184c782
- Update to 2.15.2
184c782
b808d48
* Sun Sep 08 2013 Remi Collet <remi@fedoraproject.org> - 2.15.0-1
b808d48
- Update to 2.15.0
b808d48
e1f9a9b
* Mon Aug 26 2013 Remi Collet <remi@fedoraproject.org> - 2.14.0-1
e1f9a9b
- Update to 2.14.0
e1f9a9b
8f74b5f
* Wed Aug 21 2013 Remi Collet <remi@fedoraproject.org> - 2.13.1-1
8f74b5f
- Update to 2.13.1
8f74b5f
1149e0a
* Tue Aug 20 2013 Remi Collet <remi@fedoraproject.org> - 2.13.0-1
1149e0a
- Update to 2.13.0
1149e0a
04b694b
* Thu Jul 25 2013 Remi Collet <remi@fedoraproject.org> - 2.12.0-1
04b694b
- Update to 2.12.0
04b694b
- Horde_Secret, Horde_Stream_Filter and json are now mandatory
04b694b
7b9ac7c
* Wed Jun 19 2013 Remi Collet <remi@fedoraproject.org> - 2.11.6-1
7b9ac7c
- Update to 2.11.6
7b9ac7c
c4d6198
* Fri May 31 2013 Remi Collet <remi@fedoraproject.org> - 2.11.2-1
c4d6198
- Update to 2.11.2
c4d6198
- add mising requires on Horde_Translation
c4d6198
4c41257
* Tue May 21 2013 Remi Collet <remi@fedoraproject.org> - 2.10.1-1
4c41257
- Update to 2.10.1
4c41257
- switch from Conflicts >= max to Requires < max
4c41257
8c8ab8b
* Sat May 04 2013 Remi Collet <remi@fedoraproject.org> - 2.9.0-1
8c8ab8b
- Update to 2.9.0
8c8ab8b
- drop optional requires imap
8c8ab8b
- add optional dependency on Horde_Db
8c8ab8b
c1e6a4b
* Fri Apr 19 2013 Remi Collet <remi@fedoraproject.org> - 2.8.2-1
c1e6a4b
- Update to 2.8.2
c1e6a4b
53bf590
* Fri Mar 29 2013 Remi Collet <remi@fedoraproject.org> - 2.8.1-1
53bf590
- Update to 2.8.1
53bf590
53bf590
* Wed Mar 27 2013 Remi Collet <remi@fedoraproject.org> - 2.8.0-1
53bf590
- Update to 2.8.0
53bf590
53bf590
* Sat Mar 09 2013 Remi Collet <remi@fedoraproject.org> - 2.7.2-1
53bf590
- Update to 2.7.2
53bf590
53bf590
* Wed Mar 06 2013 Remi Collet <remi@fedoraproject.org> - 2.7.1-1
53bf590
- Update to 2.7.1
53bf590
53bf590
* Tue Feb 26 2013 Remi Collet <remi@fedoraproject.org> - 2.7.0-1
53bf590
- Update to 2.7.0
53bf590
53bf590
* Sat Feb 09 2013 Remi Collet <remi@fedoraproject.org> - 2.6.0-1
53bf590
- Update to 2.6.0
53bf590
53bf590
* Wed Jan 23 2013 Remi Collet <remi@fedoraproject.org> - 2.5.0-1
53bf590
- Update to 2.5.0
53bf590
53bf590
* Sat Jan  5 2013 Remi Collet <remi@fedoraproject.org> - 2.4.2-1
53bf590
- Update to 2.4.2
53bf590
53bf590
* Fri Dec 21 2012 Remi Collet <remi@fedoraproject.org> - 2.4.1-1
53bf590
- Update to 2.4.1
53bf590
53bf590
* Tue Dec 18 2012 Remi Collet <remi@fedoraproject.org> - 2.4.0-1
53bf590
- Update to 2.4.0
53bf590
53bf590
* Sat Dec  8 2012 Remi Collet <remi@fedoraproject.org> - 2.3.2-1
53bf590
- Update to 2.3.2
53bf590
53bf590
* Tue Dec  4 2012 Remi Collet <remi@fedoraproject.org> - 2.3.0-1
53bf590
- Update to 2.3.0
53bf590
53bf590
* Wed Nov 28 2012 Remi Collet <remi@fedoraproject.org> - 2.2.3-1
53bf590
- Update to 2.2.3
53bf590
53bf590
* Tue Nov 27 2012 Remi Collet <remi@fedoraproject.org> - 2.2.2-1
53bf590
- Update to 2.2.2
53bf590
- review locale management
53bf590
53bf590
* Thu Nov 22 2012 Remi Collet <remi@fedoraproject.org> - 2.2.1-1
53bf590
- Update to 2.2.1
53bf590
53bf590
* Mon Nov 19 2012 Remi Collet <remi@fedoraproject.org> - 2.2.0-1
53bf590
- Update to 2.2.0
53bf590
53bf590
* Mon Nov 12 2012 Remi Collet <remi@fedoraproject.org> - 2.1.6-1
53bf590
- Update to 2.1.6
53bf590
53bf590
* Wed Nov  7 2012 Remi Collet <remi@fedoraproject.org> - 2.1.5-1
53bf590
- Update to 2.1.5
53bf590
53bf590
* Tue Nov  6 2012 Remi Collet <remi@fedoraproject.org> - 2.1.3-1
53bf590
- Update to 2.1.3
53bf590
53bf590
* Sun Nov  4 2012 Remi Collet <remi@fedoraproject.org> - 2.1.1-1
53bf590
- Update to 2.1.1
53bf590
53bf590
* Sat Nov  3 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-1
53bf590
- Update to 2.0.0
53bf590