summaryrefslogtreecommitdiffstats
path: root/php-khanamiryan-qrcode-detector-decoder.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-11-30 09:08:04 +0100
committerRemi Collet <remi@remirepo.net>2020-11-30 09:08:04 +0100
commit7978f2fa81ca5d1bcded6938d358396e3ec37eea (patch)
treeb6fad8a470a0c7e424bb46a7211229079acad696 /php-khanamiryan-qrcode-detector-decoder.spec
parentc6a20a3753076c0138c04c04b18b04c33d8a9464 (diff)
update to 1.0.4
add patch for PHP 8 from https://github.com/khanamiryan/php-qrcode-detector-decoder/pull/103 switch to phpunit9
Diffstat (limited to 'php-khanamiryan-qrcode-detector-decoder.spec')
-rw-r--r--php-khanamiryan-qrcode-detector-decoder.spec33
1 files changed, 23 insertions, 10 deletions
diff --git a/php-khanamiryan-qrcode-detector-decoder.spec b/php-khanamiryan-qrcode-detector-decoder.spec
index 9752f5a..9f4aa02 100644
--- a/php-khanamiryan-qrcode-detector-decoder.spec
+++ b/php-khanamiryan-qrcode-detector-decoder.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 89b57f2d9939dd57394b83f6ccbd3e1a74659e34
+%global gh_commit 07fceefb79d895e858e52921afb9c1433d2f3d5e
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner khanamiryan
%global gh_project php-qrcode-detector-decoder
@@ -20,7 +20,7 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-%{pk_vendor}-%{pk_project}
-Version: 1.0.3
+Version: 1.0.4
Release: 1%{?dist}
Summary: QR code decoder / reader
@@ -32,6 +32,8 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
# From https://github.com/khanamiryan/php-qrcode-detector-decoder/pull/80
Patch0: https://patch-diff.githubusercontent.com/raw/khanamiryan/php-qrcode-detector-decoder/pull/80.patch
+# From https://github.com/khanamiryan/php-qrcode-detector-decoder/pull/103
+Patch1: https://patch-diff.githubusercontent.com/raw/khanamiryan/php-qrcode-detector-decoder/pull/103.patch
BuildArch: noarch
%if %{with_tests}
@@ -44,14 +46,18 @@ BuildRequires: php-iconv
BuildRequires: php-mbstring
BuildRequires: php-spl
# From composer.json, "require-dev": {
-# "phpunit/phpunit": "^5.7"
-BuildRequires: php-composer(phpunit/phpunit)
+# "phpunit/phpunit": "^9.0"
+%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
+%global phpunit %{_bindir}/phpunit9
+%else
+%global phpunit %{_bindir}/phpunit8
+%endif
# Required by autoloader
%endif
BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require": {
-# "php": "^5.6|^7.0"
+# "php": ">=5.6"
Requires: php(language) >= 5.6
# From phpcompatinfo report for version 1
Requires: php-reflection
@@ -83,6 +89,7 @@ Autoloader: %{php_home}/%{ns_project}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p1
+%patch1 -p1
%build
@@ -107,16 +114,16 @@ cp -pr lib %{buildroot}%{php_home}/%{ns_project}
%check
%if %{with_tests}
mkdir vendor
-cat << 'EOF' | tee tests/bootstrap.php
+cat << 'EOF' | tee vendor/autoload.php
<?php
require '%{buildroot}%{php_home}/%{ns_project}/autoload.php';
EOF
ret=0
-# TODO php 8: Tests: 1, Assertions: 0, Errors: 1.
-for cmd in php php56 php70 php71 php72 php73 php74; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit --verbose || ret=1
+for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do
+ if which $cmdarg; then
+ set $cmdarg
+ $1 ${2:-%{_bindir}/phpunit9} $filter --verbose || ret=1
fi
done
exit $ret
@@ -135,6 +142,12 @@ exit $ret
%changelog
+* Mon Nov 30 2020 Remi Collet <remi@remirepo.net> - 1.0.4-1
+- update to 1.0.4
+- add patch for PHP 8 from
+ https://github.com/khanamiryan/php-qrcode-detector-decoder/pull/103
+- switch to phpunit9
+
* Mon Apr 20 2020 Remi Collet <remi@remirepo.net> - 1.0.3-1
- update to 1.0.3