summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-10-25 13:57:48 +0200
committerRemi Collet <remi@php.net>2021-10-25 13:57:48 +0200
commit5922e594daaf52b933f195ef681a491b0205eceb (patch)
tree69acde76246981bfc62bdd93d51611d8876329e0
dup v1
-rw-r--r--.gitignore9
-rw-r--r--Makefile4
-rw-r--r--composer.json22
-rw-r--r--php-psr-container2.spec103
4 files changed, 138 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..01f0400
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+clog
+package-*.xml
+*.tgz
+*.tar.bz2
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..13af741
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../../common/Makefile
+
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..3797a25
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,22 @@
+{
+ "name": "psr/container",
+ "type": "library",
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "keywords": ["psr", "psr-11", "container", "container-interop", "container-interface"],
+ "homepage": "https://github.com/php-fig/container",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "require": {
+ "php": ">=7.2.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ }
+}
diff --git a/php-psr-container2.spec b/php-psr-container2.spec
new file mode 100644
index 0000000..431e1b6
--- /dev/null
+++ b/php-psr-container2.spec
@@ -0,0 +1,103 @@
+# remirepo/fedora spec file for php-psr-container
+#
+# Copyright (c) 2017-2021 Remi Collet
+# License: CC-BY-SA
+# http://creativecommons.org/licenses/by-sa/4.0/
+#
+# Please, preserve the changelog entries
+#
+
+%global gh_commit 8622567409010282b7aeebe4bb841fe98b58dcaf
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_owner php-fig
+%global gh_project container
+
+%global pk_vendor psr
+%global pk_project container
+
+%{!?phpdir: %global phpdir %{_datadir}/php}
+
+Name: php-%{pk_vendor}-%{pk_project}
+Version: 1.1.1
+Release: 1%{?dist}
+Summary: Common Container Interface
+
+License: MIT
+URL: https://github.com/%{gh_owner}/%{gh_project}
+Source0: %{url}/archive/%{gh_commit}/%{name}-%{version}-%{gh_commit}.tar.gz
+
+BuildArch: noarch
+# For tests
+BuildRequires: php(language) >= 7.2.0
+BuildRequires: php-cli
+BuildRequires: php-composer(fedora/autoloader)
+
+# From composer.json, "require": {
+# "php": ">=7.2.0"
+Requires: php(language) >= 7.2.0
+# phpcompatinfo (computed from version 1.0.0)
+# <none>
+# Autoloader
+Requires: php-composer(fedora/autoloader)
+
+# Composer
+Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version}
+
+
+%description
+This package holds all interfaces/classes/traits related to PSR-11.
+
+Note that this is not a container implementation of its own.
+
+Autoloader: %{_datadir}/php/Psr/Container/autoload.php
+
+
+%prep
+%setup -qn %{gh_project}-%{gh_commit}
+
+: Create autoloader
+cat <<'AUTOLOAD' | tee src/autoload.php
+<?php
+/* Autoloader for %{pk_vendor}/%{pk_project} and its dependencies */
+
+require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
+
+\Fedora\Autoloader\Autoload::addPsr4('Psr\\Container\\', __DIR__);
+AUTOLOAD
+
+
+%build
+# Empty build section, nothing to build
+
+
+%install
+mkdir -p %{buildroot}%{_datadir}/php/Psr
+cp -rp src %{buildroot}%{_datadir}/php/Psr/Container
+
+
+%check
+: Test autoloader
+php -r '
+require "%{buildroot}%{_datadir}/php/Psr/Container/autoload.php";
+exit (interface_exists("Psr\\Container\\ContainerInterface") ? 0 : 1);
+'
+
+
+%files
+# remirepo:1
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%doc *.md
+%doc composer.json
+%dir %{_datadir}/php/Psr
+ %{_datadir}/php/Psr/Container
+
+
+%changelog
+* Wed Apr 14 2021 Remi Collet <remi@remirepo.net> - 1.1.1-1
+- update to 1.1.1
+- raise dependency on PHP 7.2
+
+* Mon Feb 27 2017 Remi Collet <remi@remirepo.net> - 1.0.0-1
+- Initial package, version 1.0.0
+