From 2f66798ac2bd3a7286daa30ca7b6ee7fca7a2554 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 21 Dec 2020 11:36:50 +0100 Subject: update to 1.4.1 switch to classmap autoloader --- php-tecnickcom-tc-lib-unicode.spec | 50 +++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 20 deletions(-) (limited to 'php-tecnickcom-tc-lib-unicode.spec') diff --git a/php-tecnickcom-tc-lib-unicode.spec b/php-tecnickcom-tc-lib-unicode.spec index baa6ecb..105b2e3 100644 --- a/php-tecnickcom-tc-lib-unicode.spec +++ b/php-tecnickcom-tc-lib-unicode.spec @@ -6,7 +6,7 @@ # # Please, preserve the changelog entries # -%global gh_commit c9eb7f74ec02941ba42822e5f752ee401e108109 +%global gh_commit 431064feee773b571682f1312648799e3d45315d %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: 1.3.11 +Version: 1.4.1 Release: 1%{?dist} Summary: PHP library containing Unicode methods @@ -26,39 +26,42 @@ 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-unicode-data) >= 1.6.9 with php-composer(%{c_vendor}/tc-lib-unicode-data) < 2) +BuildRequires: (php-composer(%{c_vendor}/tc-lib-unicode-data) >= 1.7 with php-composer(%{c_vendor}/tc-lib-unicode-data) < 2) %else -BuildRequires: php-composer(%{c_vendor}/tc-lib-unicode-data) < 2 -BuildRequires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 1.6.9 +BuildRequires: php-%{c_vendor}-tc-lib-unicode-data < 2 +BuildRequires: php-%{c_vendor}-tc-lib-unicode-data >= 1.7 %endif BuildRequires: php-mbstring BuildRequires: php-pcre %endif +BuildRequires: php-fedora-autoloader-devel # From composer.json, "require": { # "php": ">=5.4" # "ext-mbstring": "*", # "ext-pcre": "*", -# "tecnickcom/tc-lib-unicode-data": "^1.6.9" +# "tecnickcom/tc-lib-unicode-data": "^1.7" Requires: php(language) >= 5.4 Requires: php-mbstring Requires: php-pcre %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(%{c_vendor}/tc-lib-unicode-data) >= 1.6.9 with php-composer(%{c_vendor}/tc-lib-unicode-data) < 2) +Requires: (php-composer(%{c_vendor}/tc-lib-unicode-data) >= 1.7 with php-composer(%{c_vendor}/tc-lib-unicode-data) < 2) %else -Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) < 2 -Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 1.6.9 +Requires: php-%{c_vendor}-tc-lib-unicode-data < 2 +Requires: php-%{c_vendor}-tc-lib-unicode-data >= 1.7 %endif # From phpcompatinfo report for version 1.2.1 # None +BuildRequires: php-fedora-autoloader-devel # Composer Provides: php-composer(%{c_vendor}/%{gh_project}) = %{version} @@ -81,30 +84,33 @@ grep -q '^%{version}$' VERSION %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/Unicode/Data/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 < - 1.4.1-1 +- update to 1.4.1 +- switch to classmap autoloader + * Fri Jan 3 2020 Remi Collet - 1.3.11-1 - update to 1.3.11 (no change) -- cgit