summaryrefslogtreecommitdiffstats
path: root/php-clue-stream-filter.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-clue-stream-filter.spec')
-rw-r--r--php-clue-stream-filter.spec55
1 files changed, 38 insertions, 17 deletions
diff --git a/php-clue-stream-filter.spec b/php-clue-stream-filter.spec
index bb6247c..087ee5a 100644
--- a/php-clue-stream-filter.spec
+++ b/php-clue-stream-filter.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-clue-stream-filter
#
-# Copyright (c) 2017 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2017-2022 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,8 +12,8 @@
%global github_owner clue
%global github_name php-stream-filter
-%global github_version 1.4.0
-%global github_commit d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0
+%global github_version 1.6.0
+%global github_commit d6169430c7731d8509da7aecd0af756a5747b78e
%global composer_vendor clue
%global composer_project stream-filter
@@ -22,7 +22,7 @@
%global php_min_ver 5.3
# Build using "--without tests" to disable tests
-%global with_tests 0%{!?_without_tests:1}
+%bcond_without tests
%{!?phpdir: %global phpdir %{_datadir}/php}
@@ -31,28 +31,31 @@ Version: %{github_version}
Release: 1%{?github_release}%{?dist}
Summary: A simple and modern approach to stream filtering in PHP
-Group: Development/Libraries
License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
-Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
+
+# GitHub export does not include tests
+# Run php-clue-stream-filter-get-source.sh to create full source
+Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
+Source1: %{name}-get-source.sh
BuildArch: noarch
# Tests
-%if %{with_tests}
+%if %{with tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: php-composer(phpunit/phpunit)
-## phpcompatinfo (computed from version 1.4.0)
+%global phpunit %{_bindir}/phpunit9
+BuildRequires: phpunit9 >= 9.3
+## phpcompatinfo (computed from version 1.5.0)
BuildRequires: php-reflection
BuildRequires: php-spl
-BuildRequires: php-zlib
## Autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
# composer.json
Requires: php(language) >= %{php_min_ver}
-# phpcompatinfo (computed from version 1.4.0)
+# phpcompatinfo (computed from version 1.5.0)
Requires: php-reflection
Requires: php-spl
# Autoloader
@@ -84,7 +87,7 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Clue\\StreamFilter\\', __DIR__);
\Fedora\Autoloader\Dependencies::required(array(
- __DIR__.'/functions.php',
+ __DIR__.'/functions_include.php',
));
AUTOLOAD
@@ -95,13 +98,21 @@ cp -rp src %{buildroot}%{phpdir}/Clue/StreamFilter
%check
-%if %{with_tests}
+%if %{with tests}
+: Mock Composer autoloader
+mkdir vendor
+cat <<'AUTOLOAD' | tee vendor/autoload.php
+<?php
+require_once '%{buildroot}%{phpdir}/Clue/StreamFilter/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('Clue\\Tests\\StreamFilter\\', dirname(__DIR__).'/tests');
+AUTOLOAD
+
: Upstream tests
RETURN_CODE=0
-for PHP_EXEC in php %{?rhel:php54 php55} php56 php70 php71 php72; do
- if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then
- $PHP_EXEC %{_bindir}/phpunit --verbose \
- --bootstrap %{buildroot}%{phpdir}/Clue/StreamFilter/autoload.php \
+for CMDARG in "php %{phpunit}" php74 php80 php81; do
+ if which $CMDARG; then
+ set $CMDARG
+ $1 ${2:-%{_bindir}/phpunit9} --verbose \
|| RETURN_CODE=1
fi
done
@@ -121,6 +132,16 @@ exit $RETURN_CODE
%changelog
+* Tue Feb 22 2022 Remi Collet <remi@remirepo.net> - 1.6.0-1
+- update to 1.6.0
+
+* Tue Nov 3 2020 Remi Collet <remi@remirepo.net> - 1.5.0-1
+- update to 1.5.0
+- switch to phpunit9
+
+* Fri May 10 2019 Shawn Iwinski <shawn@iwin.ski> - 1.4.1-1
+- Update to 1.4.1 (RHBZ #1698047)
+
* Thu Aug 31 2017 Shawn Iwinski <shawn@iwin.ski> - 1.4.0-1
- Update to 1.4.0 (RHBZ #1482951)
- Merge default and SCL tests (normailzed to what other specs use)