From b9dac1bf9fefd9386ae33704aa65f72f8c760948 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 9 Sep 2024 09:05:31 +0200 Subject: update to 5.0.0 move to /usr/share/php/netresearch/jsonmapper5 --- composer.json | 11 +++++++++++ php-netresearch-jsonmapper.spec | 32 +++++++++++++++++++++----------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 5a9e0b5..fe9e623 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,17 @@ "autoload": { "psr-0": {"JsonMapper": "src/"} }, + "autoload-dev": { + "psr-4": { + "namespacetest\\": "tests/support/namespacetest", + "othernamespace\\": "tests/support/othernamespace", + "Enums\\": "tests/support/Enums" + }, + "psr-0": { + "JsonMapperTest_": "tests/support", + "": ["tests/support/Zoo"] + } + }, "authors": [ { "name": "Christian Weiske", diff --git a/php-netresearch-jsonmapper.spec b/php-netresearch-jsonmapper.spec index 381aed1..072f027 100644 --- a/php-netresearch-jsonmapper.spec +++ b/php-netresearch-jsonmapper.spec @@ -6,7 +6,10 @@ # # Please, preserve the changelog entries # -%global gh_commit 132c75c7dd83e45353ebb9c6c9f591952995bbf0 + +%bcond_without tests + +%global gh_commit 8c64d8d444a5d764c641ebe97e0e3bc72b25bf6c %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner cweiske %global gh_project jsonmapper @@ -15,12 +18,13 @@ %global pk_project jsonmapper %global php_home %{_datadir}/php -%global with_tests 0%{!?_without_tests:1} + +%global major 5 Name: php-%{pk_vendor}-%{pk_project} -Version: 4.4.1 +Version: 5.0.0 Release: 1%{?dist} -Summary: Map nested JSON structures onto PHP classes +Summary: Map nested JSON structures onto PHP classes, version %{major} License: OSL-3.0 URL: https://github.com/%{gh_owner}/%{gh_project} @@ -29,7 +33,7 @@ Source0: %{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh BuildArch: noarch -%if %{with_tests} +%if %{with tests} # For tests BuildRequires: php(language) >= 7.1 BuildRequires: php-date @@ -95,20 +99,23 @@ phpab --template fedora --output src/autoload.php src %install : Library mkdir -p %{buildroot}%{php_home}/%{pk_vendor} -cp -pr src %{buildroot}%{php_home}/%{pk_vendor}/%{pk_project} +cp -pr src %{buildroot}%{php_home}/%{pk_vendor}/%{pk_project}%{major} %check -%if %{with_tests} +%if %{with tests} mkdir vendor +phpab --template fedora --output vendor/autoload.php tests +cat << 'EOF' | tee -a vendor/autoload.php +require_once "%{buildroot}%{php_home}/%{pk_vendor}/%{pk_project}%{major}/autoload.php"; +EOF : Run upstream test suite ret=0 -for cmd in "php %{phpunit}" php81 php82 php83; do +for cmd in "php %{phpunit}" php81 php82 php83 php84; do if which $cmd; then set $cmd $1 ${2:-%{_bindir}/phpunit10} \ - --bootstrap %{buildroot}%{php_home}/%{pk_vendor}/%{pk_project}/autoload.php \ --no-coverage \ . || ret=1 fi @@ -120,15 +127,18 @@ exit $ret %files -%{!?_licensedir:%global license %%doc} %license LICENSE %doc composer.json %doc ChangeLog README.rst %dir %{php_home}/%{pk_vendor} - %{php_home}/%{pk_vendor}/%{pk_project} + %{php_home}/%{pk_vendor}/%{pk_project}%{major} %changelog +* Mon Sep 9 2024 Remi Collet - 5.0.0-1 +- update to 5.0.0 +- move to /usr/share/php/netresearch/jsonmapper5 + * Wed Jan 31 2024 Remi Collet - 4.4.1-1 - update to 4.4.1 -- cgit