summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-12-15 07:39:22 +0100
committerRemi Collet <fedora@famillecollet.com>2016-12-15 07:39:22 +0100
commit265424bd8fdd9189a853439ceffef0a30a0563e4 (patch)
tree0e8a27da809ee929b1044ebf44e7d7551c1b2643
parentd3386e4eca34388bbc84fac14747fe525ca9d574 (diff)
php-aura-router: 3.0.1
-rw-r--r--composer.json27
-rw-r--r--php-aura-router.spec66
2 files changed, 53 insertions, 40 deletions
diff --git a/composer.json b/composer.json
index dc9803f..87dbdc2 100644
--- a/composer.json
+++ b/composer.json
@@ -1,14 +1,15 @@
{
"name": "aura/router",
"type": "library",
- "description": "A web router implementation; given a URI path and a copy of $_SERVER, it will extract path-info parameter values for a specific route.",
+ "description": "Powerful, flexible web routing for PSR-7 requests.",
"keywords": [
"route",
"router",
- "routing"
+ "routing",
+ "psr-7"
],
"homepage": "https://github.com/auraphp/Aura.Router",
- "license": "BSD-2-Clause",
+ "license": "MIT",
"authors": [
{
"name": "Aura.Router Contributors",
@@ -16,29 +17,21 @@
}
],
"require": {
- "php": ">=5.3.0"
+ "php": ">=5.5.0",
+ "psr/http-message": "~1.0",
+ "psr/log": "~1.0"
},
"autoload": {
"psr-4": {
- "Aura\\Router\\": "src/",
- "Aura\\Router\\_Config\\": "config/"
- }
- },
- "extra": {
- "aura": {
- "type": "library",
- "config": {
- "common": "Aura\\Router\\_Config\\Common"
- }
+ "Aura\\Router\\": "src/"
}
},
"require-dev": {
- "aura/di": "~2.0"
+ "zendframework/zend-diactoros": "~1.0"
},
"autoload-dev": {
"psr-4": {
- "Aura\\Router\\": "tests/",
- "Aura\\Di\\": "vendor/aura/di/tests"
+ "Aura\\Router\\": "tests/"
}
}
}
diff --git a/php-aura-router.spec b/php-aura-router.spec
index 1998c84..3967453 100644
--- a/php-aura-router.spec
+++ b/php-aura-router.spec
@@ -6,7 +6,7 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 457efd185e4306fa671d659a66a2d9d28bf91a56
+%global gh_commit 6daebc9747e26a6fdd545d1ed5982b276f17b7a2
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner auraphp
%global gh_project Aura.Router
@@ -18,46 +18,51 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-%{pk_owner}-%{pk_project}
-Version: 2.3.0
+Version: 3.0.1
Release: 1%{?dist}
-Summary: A web router implementation
+Summary: Powerful, flexible web routing for PSR-7 requests
Group: Development/Libraries
-License: BSD
+License: MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
-BuildRequires: %{_bindir}/phpab
+BuildRequires: php-composer(fedora/autoloader)
# Tests
%if %{with_tests}
-BuildRequires: php(language) >= 5.3.0
+BuildRequires: php(language) >= 5.5.0
+BuildRequires: php-composer(psr/http-message) >= 1.0
+BuildRequires: php-composer(psr/log) >= 1.0
BuildRequires: php-pcre
BuildRequires: php-spl
BuildRequires: php-composer(phpunit/phpunit)
# From composer.json, "require-dev": {
-# "aura/di": "~2.0"
-BuildRequires: php-composer(%{pk_owner}/di) >= 2.0
+# "zendframework/zend-diactoros": "~1.0"
+BuildRequires: php-composer(zendframework/zend-diactoros) >= 1.0
%endif
# From composer, "require": {
-# "php": ">=5.3.0"
-Requires: php(language) >= 5.3.0
+# "php": ">=5.5.0",
+# "psr/http-message": "~1.0",
+# "psr/log": "~1.0"
+Requires: php(language) >= 5.5.0
+Requires: php-composer(psr/http-message) >= 1.0
+Requires: php-composer(psr/http-message) < 2
+Requires: php-composer(psr/log) >= 1.0
+Requires: php-composer(psr/log) < 2
# From phpcompatinfo report for version 2.3.0
Requires: php-pcre
Requires: php-spl
+# Autoloader
+Requires: php-composer(fedora/autoloader)
Provides: php-composer(%{pk_owner}/%{pk_project}) = %{version}
%description
-Provides a web router implementation: given a URL path and a copy of
-$_SERVER, it will extract path-info and $_SERVER values for a specific route.
-
-This package does not provide a dispatching mechanism. Your application is
-expected to take the information provided by the matching route and dispatch
-it on its own. For one possible dispatch system, please see Aura.Dispatcher.
+Powerful, flexible web routing for PSR-7 requests.
Autoloader: %{php_home}/%{ns_owner}/%{ns_project}/autoload.php
@@ -65,13 +70,19 @@ Autoloader: %{php_home}/%{ns_owner}/%{ns_project}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-# Restore sources tree matching namespaces
-mv config src/_Config
-
%build
-: Generate a classmap autoloader
-%{_bindir}/phpab --output src/autoload.php src
+cat << 'EOF' | tee -a src/autoload.php
+<?php
+/* Autoloader for %{pk_owner}/%{pk_project} and its dependencies */
+
+require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('Aura\\Router\\', __DIR__);
+\Fedora\Autoloader\Dependencies::required(array(
+ '%{php_home}/Psr/Http/Message/autoload.php',
+ '%{php_home}/Psr/Log/autoload.php',
+));
+EOF
%install
@@ -86,8 +97,9 @@ cp -pr src %{buildroot}%{php_home}/%{ns_owner}/%{ns_project}
mkdir vendor
cat << 'EOF' | tee -a vendor/autoload.php
<?php
-require '%{php_home}/%{ns_owner}/Di/autoload.php';
require '%{buildroot}/%{php_home}/%{ns_owner}/%{ns_project}/autoload.php';
+require '%{php_home}/Zend/Diactoros/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('Aura\\Router\\', dirname(__DIR__) . '/tests');
EOF
# remirepo:11
@@ -98,7 +110,7 @@ if which php56; then
run=1
fi
if which php71; then
- php70 %{_bindir}/phpunit --verbose || ret=1
+ php71 %{_bindir}/phpunit --verbose || ret=1
run=1
fi
if [ $run -eq 0 ]; then
@@ -126,6 +138,14 @@ rm -rf %{buildroot}
%changelog
+* Thu Dec 15 2016 Remi Collet <remi@fedoraproject.org> - 3.0.1-1
+- update to 3.0.0
+- License is now MIT
+- update package Summary and Description
+- raise dependency on PHP 5.5
+- add dependency on psr/http-message and psr/log
+- switch to fedora/autoloader
+
* Fri Jul 1 2016 Remi Collet <remi@fedoraproject.org> - 2.3.0-1
- initial package