summaryrefslogtreecommitdiffstats
path: root/php-felixfbecker-advanced-json-rpc3.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-felixfbecker-advanced-json-rpc3.spec')
-rw-r--r--php-felixfbecker-advanced-json-rpc3.spec58
1 files changed, 36 insertions, 22 deletions
diff --git a/php-felixfbecker-advanced-json-rpc3.spec b/php-felixfbecker-advanced-json-rpc3.spec
index 1a02106..70a67f4 100644
--- a/php-felixfbecker-advanced-json-rpc3.spec
+++ b/php-felixfbecker-advanced-json-rpc3.spec
@@ -1,12 +1,12 @@
-# remirepo/fedora spec file php-felixfbecker-advanced-json-rpc
+# remirepo/fedora spec file php-felixfbecker-advanced-json-rpc3
#
-# Copyright (c) 2017 Remi Collet
+# Copyright (c) 2017-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%global gh_commit 543ffb38b9af47f16404ab2daec5aaf225dcb531
+%global gh_commit 29f1d8c2c17f8c04f9768d382b72aeeb0715ebb8
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner felixfbecker
%global gh_project php-advanced-json-rpc
@@ -16,11 +16,12 @@
%global ns_vendor %nil
%global ns_project AdvancedJsonRpc
+%global major 3
%global php_home %{_datadir}/php
%global with_tests 0%{!?_without_tests:1}
-Name: php-%{pk_vendor}-%{pk_project}
-Version: 2.0.3
+Name: php-%{pk_vendor}-%{pk_project}%{major}
+Version: 3.0.1
Release: 1%{?dist}
Summary: A more advanced JSONRPC implementation
@@ -35,13 +36,16 @@ BuildArch: noarch
BuildRequires: php(language) >= 7.0
BuildRequires: php-reflection
BuildRequires: php-json
-BuildRequires: php-composer(netresearch/jsonmapper) < 2
-BuildRequires: php-composer(netresearch/jsonmapper) >= 1.0
-BuildRequires: php-composer(phpdocumentor/reflection-docblock) < 4
-BuildRequires: php-composer(phpdocumentor/reflection-docblock) >= 3.1
+%if 0%{?fedora} >= 27
+BuildRequires: (php-composer(netresearch/jsonmapper) >= 1.0 with php-composer(netresearch/jsonmapper) < 2)
+BuildRequires: (php-composer(phpdocumentor/reflection-docblock) >= 4.0 with php-composer(phpdocumentor/reflection-docblock) < 5)
+%else
+BuildRequires: php-netresearch-jsonmapper
+BuildRequires: php-phpdocumentor-reflection-docblock4
+%endif
# From composer.json, "require-dev": {
-# "phpunit/phpunit": "^5.5"
-BuildRequires: php-composer(phpunit/phpunit) >= 5.5
+# "phpunit/phpunit": "^6.0.0"
+BuildRequires: phpunit6
# Required by autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
@@ -51,11 +55,14 @@ BuildRequires: php-composer(fedora/autoloader)
# "netresearch/jsonmapper": "^1.0",
# "phpdocumentor/reflection-docblock": "^3.1"
Requires: php(language) >= 7.0
-Requires: php-composer(netresearch/jsonmapper) < 2
-Requires: php-composer(netresearch/jsonmapper) >= 1.0
-Requires: php-composer(phpdocumentor/reflection-docblock) < 4
-Requires: php-composer(phpdocumentor/reflection-docblock) >= 3.1
-# From phpcompatinfo report for version 2.0.3
+%if 0%{?fedora} >= 27
+BuildRequires: (php-composer(netresearch/jsonmapper) >= 1.0 with php-composer(netresearch/jsonmapper) < 2)
+BuildRequires: (php-composer(phpdocumentor/reflection-docblock) >= 4.0 with php-composer(phpdocumentor/reflection-docblock) < 5)
+%else
+Requires: php-netresearch-jsonmapper
+Requires: php-phpdocumentor-reflection-docblock4
+%endif
+# From phpcompatinfo report for version 3.0.1
Requires: php-reflection
Requires: php-json
# Required by autoloader
@@ -79,7 +86,7 @@ on it.
The delimiter is configurable and defaults to the PHP object operator ->.
-Autoloader: %{php_home}/%{ns_project}/autoload.php
+Autoloader: %{php_home}/%{ns_project}%{major}/autoload.php
%prep
@@ -91,7 +98,7 @@ cat << 'EOF' | tee lib/autoload.php
require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('%{ns_project}\\', __DIR__);
\Fedora\Autoloader\Dependencies::required([
- '%{php_home}/phpDocumentor/Reflection/DocBlock/autoload.php',
+ '%{php_home}/phpDocumentor/Reflection/DocBlock4/autoload.php',
'%{php_home}/netresearch/jsonmapper/autoload.php',
]);
EOF
@@ -104,21 +111,21 @@ EOF
%install
: Library
mkdir -p %{buildroot}%{php_home}
-cp -pr lib %{buildroot}%{php_home}/%{ns_project}
+cp -pr lib %{buildroot}%{php_home}/%{ns_project}%{major}
%check
%if %{with_tests}
cat << 'EOF' | tee bootstrap.php
<?php
-require '%{buildroot}%{php_home}/%{ns_project}/autoload.php';
+require '%{buildroot}%{php_home}/%{ns_project}%{major}/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('%{ns_project}\\Tests\\', __DIR__ . '/tests');
EOF
ret=0
for cmd in php php70 php71 php72; do
if which $cmd; then
- $cmd %{_bindir}/phpunit --bootstrap bootstrap.php --verbose tests || ret=1
+ $cmd %{_bindir}/phpunit6 --bootstrap bootstrap.php --verbose tests || ret=1
fi
done
exit $ret
@@ -133,10 +140,17 @@ exit $ret
#license LICENSE
%doc composer.json
%doc README.md
-%{php_home}/%{ns_project}
+%{php_home}/%{ns_project}%{major}
%changelog
+* Mon Jan 22 2018 Remi Collet <remi@remirepo.net> - 3.0.1-1
+- Update to 3.0.1
+- rename to php-felixfbecker-advanced-json-rpc3
+- move to /usr/share/php/AdvancedJsonRpc3
+- raise dependency on phpdocumentor/reflection-docblock 4.0
+- use phpunit6
+
* Sat Oct 21 2017 Remi Collet <remi@remirepo.net> - 2.0.3-1
- initial package, version 2.0.3
- open https://github.com/felixfbecker/php-advanced-json-rpc/issues/11 - LICENSE