[packages/php-container-interop] new, version 1.1.0
glen
glen at pld-linux.org
Tue Sep 13 15:36:33 CEST 2016
commit f77f4040fa9599f89f1b20225cb94250bbf6e378
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Sep 13 16:35:13 2016 +0300
new, version 1.1.0
based on fedora package, 514a7a4
autoload.php | 19 +++++++++++++++
php-container-interop.spec | 59 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 78 insertions(+)
---
diff --git a/php-container-interop.spec b/php-container-interop.spec
new file mode 100644
index 0000000..1b9d275
--- /dev/null
+++ b/php-container-interop.spec
@@ -0,0 +1,59 @@
+%define pkgname container-interop
+%define php_min_version 5.3.0
+Summary: Promoting the interoperability of container objects (DIC, SL, etc.)
+Name: php-%{pkgname}
+Version: 1.1.0
+Release: 1
+License: MIT
+Group: Development/Languages/PHP
+Source0: https://github.com/container-interop/container-interop/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 53c1d92cbfdf5e1ede5d173a41ea4b19
+Source1: autoload.php
+URL: https://github.com/container-interop/container-interop
+Requires: php(core) >= %{php_min_version}
+Requires: php-symfony2-ClassLoader >= 2.7.7
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+container-interop tries to identify and standardize features in
+container objects (service locators, dependency injection containers,
+etc.) to achieve interopererability.
+
+Through discussions and trials, we try to create a standard, made of
+common interfaces but also recommendations.
+
+If PHP projects that provide container implementations begin to adopt
+these common standards, then PHP applications and projects that use
+containers can depend on the common interfaces instead of specific
+implementations. This facilitates a high-level of interoperability and
+flexibility that allows users to consume any container implementation
+that can be adapted to these interfaces.
+
+The work done in this project is not officially endorsed by the
+PHP-FIG [1], but it is being worked on by members of PHP-FIG and other
+good developers. We adhere to the spirit and ideals of PHP-FIG, and
+hope this project will pave the way for one or more future PSRs.
+
+Autoloader: %{php_data_dir}/Interop/Container/autoload.php
+
+[1] http://www.php-fig.org/
+
+%prep
+%setup -qn container-interop-%{version}
+
+cp -p %{SOURCE1} src/Interop/Container/autoload.php
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{php_data_dir}
+cp -a src/* $RPM_BUILD_ROOT%{php_data_dir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.md LICENSE composer.json docs
+%dir %{php_data_dir}/Interop
+%{php_data_dir}/Interop/Container
diff --git a/autoload.php b/autoload.php
new file mode 100644
index 0000000..477ee4f
--- /dev/null
+++ b/autoload.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Autoloader for php-container-interop and its' dependencies
+ *
+ * @return \Symfony\Component\ClassLoader\ClassLoader
+ */
+
+if (!isset($loader) || !($loader instanceof \Symfony\Component\ClassLoader\ClassLoader)) {
+ if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) {
+ require_once '/usr/share/php/Symfony/Component/ClassLoader/ClassLoader.php';
+ }
+
+ $loader = new \Symfony\Component\ClassLoader\ClassLoader();
+ $loader->register();
+}
+
+$loader->addPrefix('Interop\\Container\\', dirname(dirname(__DIR__)));
+
+return $loader;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-container-interop.git/commitdiff/f77f4040fa9599f89f1b20225cb94250bbf6e378
More information about the pld-cvs-commit
mailing list