summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-11-05 14:35:49 +0100
committerRemi Collet <remi@remirepo.net>2019-11-05 14:35:49 +0100
commit077bced34658d8e415429918c8e2adbc30ee2f9d (patch)
tree5c8ee57f2861334255c156a9050dae0affa06c3b
new package
-rw-r--r--.gitignore8
-rw-r--r--Makefile4
-rw-r--r--composer.json26
-rw-r--r--php-psr-event-dispatcher.spec92
4 files changed, 130 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.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..667a714
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,26 @@
+{
+ "name": "psr/event-dispatcher",
+ "description": "Standard interfaces for event handling.",
+ "type": "library",
+ "keywords": ["psr", "psr-14", "events"],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "require": {
+ "php": ">=7.2.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\EventDispatcher\\": "src/"
+ }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ }
+}
diff --git a/php-psr-event-dispatcher.spec b/php-psr-event-dispatcher.spec
new file mode 100644
index 0000000..e1472b1
--- /dev/null
+++ b/php-psr-event-dispatcher.spec
@@ -0,0 +1,92 @@
+# remirepo/fedora spec file for php-psr-event-dispatcher
+#
+# Copyright (c) 2019 Remi Collet
+# License: CC-BY-SA
+# http://creativecommons.org/licenses/by-sa/4.0/
+#
+# Please, preserve the changelog entries
+#
+
+# Github
+%global gh_commit dbefd12671e8a14ec7f180cab83036ed26714bb0
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_owner php-fig
+%global gh_project event-dispatcher
+# Packagist
+%global pk_vendor psr
+%global pk_project %{gh_project}
+# Namespace
+%global ns_vendor Psr
+%global ns_project EventDispatcher
+
+Name: php-%{pk_vendor}-%{pk_project}
+Version: 1.0.0
+Release: 1%{?dist}
+Summary: Standard interfaces for event handling
+
+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
+BuildRequires: php-cli
+BuildRequires: php-fedora-autoloader-devel
+
+# From composer.json, "require": {
+# "php": ">=7.2.0",
+Requires: php(language) >= 7.2
+# phpcompatinfo (computed from version 1.0.0)
+# only core
+# Autoloader
+Requires: php-composer(fedora/autoloader)
+
+# Composer
+Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version}
+
+
+%description
+This repository holds all interfaces related to PSR-14 (Event Dispatcher).
+
+Please refer to the specification for a description:
+https://www.php-fig.org/psr/psr-14/
+
+
+Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php
+
+
+%prep
+%setup -qn %{gh_project}-%{gh_commit}
+
+
+%build
+: Generate autoloader
+%{_bindir}/phpab --template fedora --output src/autoload.php src
+
+
+%install
+mkdir -p %{buildroot}%{_datadir}/php/%{ns_vendor}
+cp -rp src %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}
+
+
+%check
+: Test autoloader
+php -nr '
+require "%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php";
+exit (interface_exists("%{ns_vendor}\\%{ns_project}\\EventDispatcherInterface") ? 0 : 1);
+'
+
+
+%files
+# remirepo:1
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%doc *.md
+%doc composer.json
+%{_datadir}/php/%{ns_vendor}/%{ns_project}
+
+
+%changelog
+* Tue Nov 5 2019 Remi Collet <remi@remirepo.net> - 1.0.0-1
+- Initial package, version 1.0.0