summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-10-31 14:18:49 +0100
committerRemi Collet <fedora@famillecollet.com>2016-10-31 14:18:49 +0100
commitb0537e1da4c914ba66670210e423c010463147e5 (patch)
tree59b752332861145d76fefe9c0a2d12f7618fa439
parent95b5057fc8aa489a0a1e1b2f1ca72c616ea5c65b (diff)
php-sebastian-recursion-context: switch to fedora autoloader
-rw-r--r--composer.json36
-rw-r--r--php-sebastian-recursion-context.spec38
2 files changed, 64 insertions, 10 deletions
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..fed033d
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,36 @@
+{
+ "name": "sebastian/recursion-context",
+ "description": "Provides functionality to recursively process PHP variables",
+ "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+ "license": "BSD-3-Clause",
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Adam Harvey",
+ "email": "aharvey@php.net"
+ }
+ ],
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.4"
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ }
+}
diff --git a/php-sebastian-recursion-context.spec b/php-sebastian-recursion-context.spec
index cc7808f..98bb145 100644
--- a/php-sebastian-recursion-context.spec
+++ b/php-sebastian-recursion-context.spec
@@ -20,7 +20,7 @@
Name: php-sebastian-recursion-context
Version: 1.0.2
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: Recursively process PHP variables
Group: Development/Libraries
@@ -31,7 +31,7 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php(language) >= 5.3.3
-BuildRequires: %{_bindir}/phpab
+BuildRequires: php-fedora-autoloader-devel
%if %{with_tests}
# from composer.json, "require-dev": {
# "phpunit/phpunit": "~4.4"
@@ -43,6 +43,8 @@ BuildRequires: php-composer(phpunit/phpunit) >= 4.4
Requires: php(language) >= 5.3.3
# from phpcompatinfo report for version 1.0.2
Requires: php-spl
+# Autoloader
+Requires: php-composer(fedora/autoloader)
Provides: php-composer(sebastian/recursion-context) = %{version}
@@ -57,7 +59,7 @@ Provides functionality to recursively process PHP variables.
%build
# Generate the Autoloader
-phpab --output src/autoload.php src
+phpab --template fedora --output src/autoload.php src
%install
@@ -68,13 +70,26 @@ cp -pr src %{buildroot}%{php_home}/SebastianBergmann/RecursionContext
%check
%if %{with_tests}
-%{_bindir}/php -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
-%{_bindir}/phpunit --bootstrap %{buildroot}%{php_home}/SebastianBergmann/RecursionContext/autoload.php
-
-if which php70; then
- %{_bindir}/php70 -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
- %{_bindir}/phpunit --bootstrap %{buildroot}%{php_home}/SebastianBergmann/RecursionContext/autoload.php
+: Run upstream test suite
+# remirepo:13
+run=0
+ret=0
+if which php56; then
+ php56 -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
+ %{_bindir}/phpunit --bootstrap %{buildroot}%{php_home}/SebastianBergmann/RecursionContext/autoload.php || ret=1
+ run=1
+fi
+if which php71; then
+ php71 -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
+ %{_bindir}/phpunit --bootstrap %{buildroot}%{php_home}/SebastianBergmann/RecursionContext/autoload.php || ret=1
+ run=1
fi
+if [ $run -eq 0 ]; then
+%{_bindir}/php -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
+%{_bindir}/phpunit --bootstrap %{buildroot}%{php_home}/SebastianBergmann/RecursionContext/autoload.php --verbose
+# remirepo:2
+fi
+exit $ret
%else
: bootstrap build with test suite disabled
%endif
@@ -94,6 +109,9 @@ rm -rf %{buildroot}
%changelog
+* Mon Oct 31 2016 Remi Collet <remi@fedoraproject.org> - 1.0.2-3
+- switch to fedora/autoloader
+
* Tue Dec 8 2015 Remi Collet <remi@fedoraproject.org> - 1.0.2-1
- update to 1.0.2
- drop dependency on hash extension
@@ -103,4 +121,4 @@ rm -rf %{buildroot}
- update to 1.0.1 (only CS)
* Sat Jan 24 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-1
-- initial package \ No newline at end of file
+- initial package