diff options
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | php-psr-cache.spec | 29 |
2 files changed, 15 insertions, 21 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ab5c4f --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/php-psr-cache.spec b/php-psr-cache.spec index ccb913c..89bdc5b 100644 --- a/php-psr-cache.spec +++ b/php-psr-cache.spec @@ -25,7 +25,7 @@ Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 1%{?github_release}%{?dist} +Release: 3%{?github_release}%{?dist} Summary: PSR Cache: Common interface for caching libraries Group: Development/Libraries @@ -33,18 +33,17 @@ License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # For tests BuildRequires: php-cli -BuildRequires: php-composer(symfony/class-loader) +BuildRequires: php-composer(fedora/autoloader) # composer.json Requires: php(language) >= %{php_min_ver} # phpcompatinfo (computed from version 1.0.0) # <none> # Autoloader -Requires: php-composer(symfony/class-loader) +Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} @@ -75,18 +74,9 @@ cat <<'AUTOLOAD' | tee src/autoload.php * @return \Symfony\Component\ClassLoader\ClassLoader */ -if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) { - if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) { - require_once '%{phpdir}/Symfony/Component/ClassLoader/ClassLoader.php'; - } +require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; +\Fedora\Autoloader\Autoload::addPsr4('Psr\\Cache\\', __DIR__); - $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader(); - $fedoraClassLoader->register(); -} - -$fedoraClassLoader->addPrefix('Psr\\Cache\\', dirname(dirname(__DIR__))); - -return $fedoraClassLoader; AUTOLOAD @@ -95,7 +85,6 @@ AUTOLOAD %install -rm -rf %{buildroot} mkdir -p %{buildroot}%{phpdir}/Psr/Cache cp -rp src/* %{buildroot}%{phpdir}/Psr/Cache/ @@ -108,12 +97,7 @@ exit (interface_exists("Psr\\Cache\\CacheItemInterface") ? 0 : 1); ' -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE.txt %doc *.md @@ -123,6 +107,9 @@ rm -rf %{buildroot} %changelog +* Wed May 10 2017 Remi Collet <remi@remirepo.net> - 1.0.1-3 +- switch to fedora/autoloader + * Sun Aug 7 2016 Remi Collet <remi@remirepo.net> - 1.0.1-1 - update to 1.0.1 (only comments) - add check for autoloader |