summaryrefslogtreecommitdiffstats
path: root/php-tecnickcom-tc-lib-pdf-parser.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-tecnickcom-tc-lib-pdf-parser.spec')
-rw-r--r--php-tecnickcom-tc-lib-pdf-parser.spec49
1 files changed, 29 insertions, 20 deletions
diff --git a/php-tecnickcom-tc-lib-pdf-parser.spec b/php-tecnickcom-tc-lib-pdf-parser.spec
index 120131d..ee5095f 100644
--- a/php-tecnickcom-tc-lib-pdf-parser.spec
+++ b/php-tecnickcom-tc-lib-pdf-parser.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 4a9ce3eadb79f679edfeceb41a3fb7865e837d7c
+%global gh_commit 4edb3c046c0a85473a43ab83aad61937dda88340
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global c_vendor tecnickcom
%global gh_owner tecnickcom
@@ -15,7 +15,7 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-%{gh_owner}-%{gh_project}
-Version: 2.3.9
+Version: 2.4.1
Release: 1%{?dist}
Summary: PHP library to parse PDF documents
@@ -26,33 +26,35 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
BuildArch: noarch
%if %{with_tests}
# For tests
-%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8
-%global phpunit %{_bindir}/phpunit7
+%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
+%global phpunit %{_bindir}/phpunit9
+BuildRequires: phpunit9 >= 9.5.0
%else
-%global phpunit %{_bindir}/phpunit
+%global phpunit %{_bindir}/phpunit8
+BuildRequires: phpunit8 >= 8.5.13
%endif
-BuildRequires: %{phpunit}
BuildRequires: php(language) >= 5.4
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(%{c_vendor}/tc-lib-pdf-filter) >= 1.3.3 with php-composer(%{c_vendor}/tc-lib-pdf-filter) < 2)
+BuildRequires: (php-composer(%{c_vendor}/tc-lib-pdf-filter) >= 1.4 with php-composer(%{c_vendor}/tc-lib-pdf-filter) < 2)
%else
-BuildRequires: php-composer(%{c_vendor}/tc-lib-pdf-filter) < 2
-BuildRequires: php-composer(%{c_vendor}/tc-lib-pdf-filter) >= 1.3.3
+BuildRequires: php-%{c_vendor}-tc-lib-pdf-filter < 2
+BuildRequires: php-%{c_vendor}-tc-lib-pdf-filter >= 1.4
%endif
BuildRequires: php-pcre
%endif
+BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require": {
# "php": ">=5.4"
# "ext-pcre": "*",
-# "tecnickcom/tc-lib-pdf-filter": "^1.3.4"
+# "tecnickcom/tc-lib-pdf-filter": "^1.4"
Requires: php(language) >= 5.4
Requires: php-pcre
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(%{c_vendor}/tc-lib-pdf-filter) >= 1.3.3 with php-composer(%{c_vendor}/tc-lib-pdf-filter) < 2)
+Requires: (php-composer(%{c_vendor}/tc-lib-pdf-filter) >= 1.4 with php-composer(%{c_vendor}/tc-lib-pdf-filter) < 2)
%else
-Requires: php-composer(%{c_vendor}/tc-lib-pdf-filter) < 2
-Requires: php-composer(%{c_vendor}/tc-lib-pdf-filter) >= 1.3.3
+Requires: php-%{c_vendor}-tc-lib-pdf-filter < 2
+Requires: php-%{c_vendor}-tc-lib-pdf-filter >= 1.4
%endif
# From phpcompatinfo report for version 2.1.0
# None
@@ -84,30 +86,33 @@ ln resources/test/example_036.pdf example
%build
-# Empty build section, most likely nothing required.
+phpab --template fedora --output src/autoload.php src
+cat << 'EOF' | tee -a src/autoload.php
+\Fedora\Autoloader\Dependencies::required([
+ '%{_datadir}/php/Com/Tecnick/Pdf/Filter/autoload.php',
+]);
+EOF
%install
mkdir -p $(dirname %{buildroot}%{php_project})
cp -pr src %{buildroot}%{php_project}
-cp -p resources/autoload.php \
- %{buildroot}%{php_project}/autoload.php
%check
%if %{with_tests}
mkdir vendor
-cat <<EOF | tee vendor/autoload.php
+cat << 'EOF' | tee vendor/autoload.php
<?php
require '%{buildroot}%{php_project}/autoload.php';
-require '%{php_project}/../Filter/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('Test\\', dirname(__DIR__) . '/test');
EOF
ret=0
-for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" "php70 %{_bindir}/phpunit6" php71 php72 php73 php74; do
+for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do
if which $cmdarg; then
set $cmdarg
- $1 ${2:-%{_bindir}/phpunit7} --no-coverage --verbose || ret=1
+ $1 ${2:-%{_bindir}/phpunit9} --no-coverage --verbose || ret=1
fi
done
exit $ret
@@ -125,6 +130,10 @@ exit $ret
%changelog
+* Mon Dec 21 2020 Remi Collet <remi@remirepo.net> - 2.4.1-1
+- update to 2.4.1
+- switch to classmap autoloader
+
* Fri Jan 3 2020 Remi Collet <remi@remirepo.net> - 2.3.9-1
- update to 2.3.9