# remirepo/fedora spec file for php-swaggest-json-diff # # Copyright (c) 2019-2022 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %bcond_without tests # Github %global gh_commit ff3a7921e9f1aa096067eb541fcfd0e7611c558c %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner swaggest %global gh_project json-diff # Packagist %global pk_vendor %{gh_owner} %global pk_project %{gh_project} # Namespace %global ns_vendor Swaggest %global ns_project JsonDiff %global major %nil Name: php-%{pk_vendor}-%{pk_project}%{major} Version: 3.9.0 Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist} Summary: JSON diff/rearrange/patch/pointer library for PHP License: MIT URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{name}-%{version}-%{?gh_short}.tgz Source1: makesrc.sh BuildArch: noarch %if %{with tests} BuildRequires: php-json # For tests, from composer.json "require-dev": { # "phpunit/phpunit": "4.8.37" BuildRequires: php-composer(phpunit/phpunit) >= 4.8.37 %global phpunit %{_bindir}/phpunit BuildRequires: php-filter BuildRequires: php-pcre # For autoloader BuildRequires: php-fedora-autoloader-devel %endif # From composer.json, "require": { # "ext-json": "*" Requires: php-json # From phpcompatinfo report for 3.7.0 Requires: php-filter Requires: php-pcre # For generated autoloader Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} %description A PHP implementation for finding unordered diff between two JSON documents. Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} %build : Create autoloader %{_bindir}/phpab -t fedora -o src/autoload.php src %install : Library mkdir -p %{buildroot}%{_datadir}/php/%{ns_vendor} cp -pr src %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major} %check %if %{with tests} mkdir vendor cat << 'EOF' | tee vendor/autoload.php - 3.9.0-1 - update to 3.9.0 * Mon Sep 27 2021 Remi Collet - 3.8.3-1 - update to 3.8.3 * Wed Sep 22 2021 Remi Collet - 3.8.2-1 - update to 3.8.2 * Mon Sep 28 2020 Remi Collet - 3.8.1-1 - update to 3.8.1 * Fri Sep 25 2020 Remi Collet - 3.8.0-1 - update to 3.8.0 * Wed May 27 2020 Remi Collet - 3.7.5-1 - update to 3.7.5 * Mon Jan 27 2020 Remi Collet - 3.7.4-1 - update to 3.7.4 * Wed Oct 23 2019 Remi Collet - 3.7.2-1 - update to 3.7.2 (no change) * Thu Sep 26 2019 Remi Collet - 3.7.1-1 - update to 3.7.1 * Thu Sep 12 2019 Remi Collet - 3.7.0-1 - initial package