diff options
author | Remi Collet <remi@remirepo.net> | 2018-01-15 08:08:07 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2018-01-15 08:08:07 +0100 |
commit | 8ec0765eedba04d0354d6cf5e0f880f35c329f91 (patch) | |
tree | 7bf05f4acd2908c15dee35b364ed6d3cc486a540 | |
parent | 3f1385e2525d6c460559f71568fc5ef2f6de2a89 (diff) |
-rw-r--r-- | php-endroid-qrcode.spec | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/php-endroid-qrcode.spec b/php-endroid-qrcode.spec index 2745b1d..6d7291c 100644 --- a/php-endroid-qrcode.spec +++ b/php-endroid-qrcode.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-endroid-qrcode # -# Copyright (c) 2017 Remi Collet +# Copyright (c) 2017-2018 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -21,7 +21,7 @@ Name: php-%{pk_vendor}-%{pk_project} Version: 1.9.3 -Release: 1%{?dist} +Release: 3%{?dist} Summary: Endroid QR Code Group: Development/Libraries @@ -113,15 +113,14 @@ find . -type f -exec chmod -x {} \; cat << 'EOF' | tee src/autoload.php <?php /* Autoloader for %{name} and its dependencies */ -require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; +require_once '%{php_home}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('%{ns_vendor}\\%{ns_project}\\', __DIR__); -\Fedora\Autoloader\Dependencies::required([ - [ - '%{php_home}/Symfony3/Component/OptionsResolver/autoload.php', - '%{php_home}/Symfony/Component/OptionsResolver/autoload.php', - ], -]); +if (file_exists('%{php_home}/Symfony3/Component/OptionsResolver/autoload.php')) { + \Fedora\Autoloader\Autoload::addPsr4('Symfony\\Component\\', '%{php_home}/Symfony3/Component'); +} else { + \Fedora\Autoloader\Autoload::addPsr4('Symfony\\Component\\', '%{php_home}/Symfony/Component'); +} EOF @@ -173,5 +172,8 @@ exit $ret %{php_home}/%{ns_vendor}/%{ns_project} %changelog +* Mon Jan 15 2018 Remi Collet <remi@remirepo.net> - 1.9.3-2 +- simpler autoloader for Symfony + * Tue Jun 27 2017 Remi Collet <remi@remirepo.net> - 1.9.3-1 - initial package, version 1.9.3 |