diff options
author | Remi Collet <remi@remirepo.net> | 2017-06-28 08:02:48 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-06-28 08:02:48 +0200 |
commit | ff64249b54b4fdb84bc899cd4d5e421fef3c870e (patch) | |
tree | 85131ba8f62af26f9ce9de1faac21e7d7b1240c6 /roundcubemail.spec | |
parent | 7aca9fca3ba8e038c154870212c771534da6d142 (diff) |
fix autoloader + add %check
Diffstat (limited to 'roundcubemail.spec')
-rw-r--r-- | roundcubemail.spec | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/roundcubemail.spec b/roundcubemail.spec index b894d5e..f6fc8ce 100644 --- a/roundcubemail.spec +++ b/roundcubemail.spec @@ -21,7 +21,7 @@ %global _logdir /var/log Name: roundcubemail Version: 1.3.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Round Cube Webmail is a browser-based multilingual IMAP client Group: Applications/System @@ -57,6 +57,23 @@ Patch2: roundcubemail-pr313.patch Patch3: roundcubemail-pr5820.patch BuildArch: noarch +# For test +BuildRequires: php-cli +BuildRequires: php-pear(PEAR) >= 1.10.1 +BuildRequires: php-pear(Net_Socket) >= 1.2.1 +BuildRequires: php-pear(Auth_SASL) >= 1.1.0 +BuildRequires: php-pear(Net_IDNA2) >= 0.2.0 +BuildRequires: php-pear(Mail_Mime) >= 1.10.0 +BuildRequires: php-pear(Net_SMTP) >= 1.7.1 +BuildRequires: php-pear(Crypt_GPG) >= 1.6.0 +BuildRequires: php-pear(Net_Sieve) >= 1.4.0 +BuildRequires: php-composer(endroid/qrcode) < 2 +BuildRequires: php-composer(endroid/qrcode) >= 1.6.5 +BuildRequires: php-pear(Net_LDAP2) >= 2.2.0 +BuildRequires: php-composer(kolab/Net_LDAP3) +BuildRequires: php-composer(fedora/autoloader) + + %if %{with_phpfpm} Requires: webserver Requires: nginx-filesystem @@ -188,7 +205,7 @@ cat << EOF | tee vendor/autoload.php require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php'; # PEAR components -\Fedora\Autoloader\Autoload::addPsr0('', '%{_datadir}/pear'); +\Fedora\Autoloader\Autoload::addIncludePath(); # Composer components \Fedora\Autoloader\Dependencies::required([ @@ -258,6 +275,24 @@ rm -r %{buildroot}%{roundcubedir}/{CHANGELOG,INSTALL,LICENSE,README.md,UPGRADING rm %{buildroot}%{roundcubedir}/composer.json-dist +%check +: Check our autoloader for needed classes +php -r ' +require "%{buildroot}%{roundcubedir}/vendor/autoload.php"; +$cl = [ "Auth_SASL", "Crypt_GPG", "Mail_mime", "Net_IDNA2", "Net_LDAP2", + "Net_LDAP3", "Net_Sieve", "Net_SMTP", "Net_Socket", "PEAR" , "Endroid\\QrCode\\QrCode" ]; +$ret = 0; +foreach ($cl as $c) { + if (class_exists($c)) { + echo "$c ok\n"; + } else { + echo("$c is missing\n"); + $ret = 1; + } +} +exit($ret); +' + %pre # Drop some old config options to ensure new defaults are used if [ -f %{_sysconfdir}/%{name}/main.inc.php ]; then @@ -297,6 +332,10 @@ fi %changelog +* Tue Jun 27 2017 Remi Collet <remi@remirepo.net> - 1.3.0-2 +- fix autoloader (for kolab/Net_LDAP3) +- add a minimal %%check for our autoloader + * Tue Jun 27 2017 Remi Collet <remi@remirepo.net> - 1.3.0-1 - update to 1.3.0 - open https://github.com/roundcube/roundcubemail/pull/5820 - PHP 7 |