From 3378d67931b3f2182bfdaf5d59d325b58149f742 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 16 Nov 2015 18:39:47 +0100 Subject: php-PsrLog: add autoloader (backported from Fedora) --- php-PsrLog.spec | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/php-PsrLog.spec b/php-PsrLog.spec index 3ac44ab..ce29507 100644 --- a/php-PsrLog.spec +++ b/php-PsrLog.spec @@ -1,7 +1,8 @@ +# remirepo spec file for php-PsrLog, from Fedora: # # RPM spec file for php-PsrLog # -# Copyright (c) 2013-2014 Shawn Iwinski +# Copyright (c) 2013-2015 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -14,9 +15,11 @@ %global github_version 1.0.0 %global github_commit fe0936ee26643249e916849d48e3a51d5f5e278b +%{!?phpdir: %global phpdir %{_datadir}/php} + Name: php-PsrLog Version: %{github_version} -Release: 6%{?dist} +Release: 8%{?dist} Summary: Common interface for logging libraries Group: Development/Libraries @@ -35,16 +38,41 @@ Requires: php-spl Provides: php-composer(psr/log) = %{version} %description -This package holds all interfaces/classes/traits related to PSR-3 -(https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md). +This package holds all interfaces/classes/traits related to PSR-3 [1]. Note that this is not a logger of its own. It is merely an interface that describes a logger. See the specification for more details. +[1] http://www.php-fig.org/psr/psr-3/ + %prep %setup -qn %{github_name}-%{github_commit} +: Create autoloader +cat <<'AUTOLOAD' | tee Psr/Log/autoload.php +register(); +} + +$fedoraClassLoader->addPrefix('Psr\\Log\\', dirname(dirname(__DIR__))); + +return $fedoraClassLoader; +AUTOLOAD + %build # Empty build section, nothing to build @@ -63,6 +91,9 @@ cp -rp Psr %{buildroot}%{_datadir}/php/ %changelog +* Mon Nov 16 2015 Shawn Iwinski - 1.0.0-8 +- Added autoloader + * Sun Jun 8 2014 Remi Collet 1.0.0-6 - backport rawhide changes. -- cgit