From 7529ac10ebae416762fb63f98d71190fc6abe8d0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 24 Nov 2017 10:35:02 +0100 Subject: switch to fedora/autoloader --- glpi-fedora-autoloader.php | 58 ++++++++++++++++++++++++++---------------- glpi.spec | 63 ++++++++++++++++++++++++++++++++++------------ 2 files changed, 84 insertions(+), 37 deletions(-) diff --git a/glpi-fedora-autoloader.php b/glpi-fedora-autoloader.php index 808881d..49ea0de 100644 --- a/glpi-fedora-autoloader.php +++ b/glpi-fedora-autoloader.php @@ -1,26 +1,42 @@ = 4.1 BuildRequires: php-composer(simplepie/simplepie) < 2 BuildRequires: php-composer(tecnickcom/tcpdf) < 7 BuildRequires: php-composer(tecnickcom/tcpdf) >= 6.2.13 -BuildRequires: php-composer(zendframework/zend-cache) < 3 -BuildRequires: php-composer(zendframework/zend-cache) >= 2.7 -BuildRequires: php-composer(zendframework/zend-i18n) < 3 -BuildRequires: php-composer(zendframework/zend-i18n) >= 2.7 -BuildRequires: php-composer(zendframework/zend-serializer) < 3 -BuildRequires: php-composer(zendframework/zend-serializer) >= 2.7 +# remirepo:1 +%if 0%{?fedora} >= 25 +BuildRequires: php-autoloader(zendframework/zend-cache) < 3 +BuildRequires: php-autoloader(zendframework/zend-cache) >= 2.7 +BuildRequires: php-autoloader(zendframework/zend-i18n) < 3 +BuildRequires: php-autoloader(zendframework/zend-i18n) >= 2.7 +BuildRequires: php-autoloader(zendframework/zend-serializer) < 3 +BuildRequires: php-autoloader(zendframework/zend-serializer) >= 2.7 +# remirepo:8 +%else +BuildRequires: php-composer(zendframework/zend-cache) < 3 +BuildRequires: php-composer(zendframework/zend-cache) >= 2.7 +BuildRequires: php-composer(zendframework/zend-i18n) < 3 +BuildRequires: php-composer(zendframework/zend-i18n) >= 2.7 +BuildRequires: php-composer(zendframework/zend-serializer) < 3 +BuildRequires: php-composer(zendframework/zend-serializer) >= 2.7 +%endif BuildRequires: php-composer(michelf/php-markdown) < 2 BuildRequires: php-composer(michelf/php-markdown) >= 1.6 BuildRequires: php-composer(true/punycode) < 3 @@ -110,6 +121,8 @@ BuildRequires: php-composer(natxet/CssMin) < 4 BuildRequires: php-composer(natxet/CssMin) >= 3.0 BuildRequires: php-composer(patchwork/jsqueeze) < 3 BuildRequires: php-composer(patchwork/jsqueeze) >= 2.0 +# Autoloader +BuildRequires: php-composer(fedora/autoloader) %if %{with_nginx} Requires: nginx-filesystem @@ -157,13 +170,24 @@ Requires: php-composer(simplepie/simplepie) >= 1.5 # 6.2.13 to ensure we have the classmap autoloader Requires: php-composer(tecnickcom/tcpdf) < 7 Requires: php-composer(tecnickcom/tcpdf) >= 6.2.13 -Requires: php-composer(zendframework/zend-cache) < 3 -Requires: php-composer(zendframework/zend-cache) >= 2.7 -Requires: php-composer(zendframework/zend-i18n) < 3 -Requires: php-composer(zendframework/zend-i18n) >= 2.7 -Requires: php-composer(zendframework/zend-serializer) < 3 -Requires: php-composer(zendframework/zend-serializer) >= 2.7 +# remirepo:1 +%if 0%{?fedora} >= 25 +Requires: php-autoloader(zendframework/zend-cache) < 3 +Requires: php-autoloader(zendframework/zend-cache) >= 2.7 +Requires: php-autoloader(zendframework/zend-i18n) < 3 +Requires: php-autoloader(zendframework/zend-i18n) >= 2.7 +Requires: php-autoloader(zendframework/zend-serializer) < 3 +Requires: php-autoloader(zendframework/zend-serializer) >= 2.7 +# remirepo:9 +%else +Requires: php-composer(zendframework/zend-cache) < 3 +Requires: php-composer(zendframework/zend-cache) >= 2.7 +Requires: php-composer(zendframework/zend-i18n) < 3 +Requires: php-composer(zendframework/zend-i18n) >= 2.7 +Requires: php-composer(zendframework/zend-serializer) < 3 +Requires: php-composer(zendframework/zend-serializer) >= 2.7 Requires: php-composer(zendframework/zend-loader) +%endif Requires: php-composer(michelf/php-markdown) < 2 Requires: php-composer(michelf/php-markdown) >= 1.6 Requires: php-composer(true/punycode) < 3 @@ -183,6 +207,8 @@ Provides: bundled(js-fuzzy) Provides: bundled(js-jquery) Provides: bundled(prism) Provides: bundled(tiny_mce) = 4.3.13 +# Autoloader +Requires: php-composer(fedora/autoloader) Requires: %{_sysconfdir}/logrotate.d Requires(postun): /sbin/service @@ -355,8 +381,10 @@ rm composer.lock : Add developement dependecies cat << 'EOF' | tee -a vendor/autoload.php -// "guzzlehttp/guzzle": "~6" -require_once $vendor . '/GuzzleHttp6/autoload.php'; +\Fedora\Autoloader\Dependencies::required([ + // "guzzlehttp/guzzle": "~6" + "$vendor/GuzzleHttp6/autoload.php", +]); EOF : No internet on the builder @@ -364,7 +392,7 @@ export GLPI_SKIP_ONLINE=1 : Running a PHP server export GLPI_URI=http://127.0.0.1:8089 -%{_bindir}/php -S 127.0.0.1:8089 tests/router.php &>/dev/null & +%{_bindir}/php -S 127.0.0.1:8089 tests/router.php &>web.log & PHPPID=$! : Skip LDAP tests for now @@ -496,6 +524,9 @@ fi %changelog +* Fri Nov 24 2017 Remi Collet - 9.2.1-5 +- switch to fedora/autoloader + * Sat Nov 18 2017 Remi Collet - 9.2.1-4 - EL7: remove SELinux rules as default policy includes them -- cgit