diff options
-rw-r--r-- | composer.json | 4 | ||||
-rwxr-xr-x | makesrc.sh | 28 | ||||
-rw-r--r-- | php-sebastian-comparator3.spec | 47 |
3 files changed, 63 insertions, 16 deletions
diff --git a/composer.json b/composer.json index e0658bc..00dfc29 100644 --- a/composer.json +++ b/composer.json @@ -24,12 +24,12 @@ ], "prefer-stable": true, "require": { - "php": "^7.1", + "php": ">=7.1", "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^8.5" }, "config": { "optimize-autoloader": true, diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..4190c13 --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +NAME=$(basename $PWD) +OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec) +PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec) +VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec) +COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec) +SHORT=${COMMIT:0:7} + +echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n" + +echo "Cloning..." +rm -rf $PROJECT-$COMMIT +git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT + +echo "Getting commit..." +pushd $PROJECT-$COMMIT +git checkout $COMMIT +cp composer.json ../composer.json +popd + +echo "Archiving..." +tar czf $NAME-$VERSION-$SHORT.tgz --exclude-vcs --exclude tools $PROJECT-$COMMIT + +echo "Cleaning..." +rm -rf $PROJECT-$COMMIT + +echo "Done." diff --git a/php-sebastian-comparator3.spec b/php-sebastian-comparator3.spec index 0ca2bb1..c3e3e5f 100644 --- a/php-sebastian-comparator3.spec +++ b/php-sebastian-comparator3.spec @@ -1,13 +1,13 @@ # remirepo/fedora spec file for php-sebastian-comparator3 # -# Copyright (c) 2014-2018 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2014-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 591a30922f54656695e59b1f39501aec513403da +%global gh_commit 1dc7ceb4a24aede938c7af2a9ed1de09609ca770 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project comparator @@ -24,14 +24,14 @@ %endif Name: php-%{pk_vendor}-%{pk_project}%{major} -Version: 3.0.1 -Release: 1%{?dist} -Summary: Compare PHP values for equality +Version: 3.0.5 +Release: 3%{?dist} +Summary: Compare PHP values for equality, version %{major} -Group: Development/Libraries -License: BSD +License: BSD-3-Clause URL: https://github.com/%{gh_owner}/%{gh_project} -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz +Source0: %{name}-%{version}-%{gh_short}.tgz +Source1: makesrc.sh BuildArch: noarch BuildRequires: php(language) >= 7.1 @@ -47,12 +47,12 @@ BuildRequires: php-sebastian-exporter3 >= 3.1 BuildRequires: php-fedora-autoloader-devel %if %{with_tests} # from composer.json, "require-dev": { -# "phpunit/phpunit": "^7.1" -BuildRequires: phpunit7 >= 7.1 +# "phpunit/phpunit": "^8.5" +BuildRequires: phpunit8 >= 8.5 %endif # from composer.json -# "php": "^7.1", +# "php": ">=7.1", # "sebastian/diff": "^3.0", # "sebastian/exporter": "^3.1" Requires: php(language) >= 7.1 @@ -78,6 +78,8 @@ Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} %description This component provides the functionality to compare PHP values for equality. +This package provides the version %{major} of the library. + Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php @@ -111,10 +113,10 @@ mkdir vendor : Run upstream test suite ret=0 -for cmd in php php71 php72; do +for cmd in php php80 php81 php82; do if which $cmd; then $cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \ - %{_bindir}/phpunit7 --no-coverage --verbose || ret=1 + %{_bindir}/phpunit8 --no-coverage --verbose || ret=1 fi done exit $ret @@ -132,6 +134,23 @@ exit $ret %changelog +* Fri Apr 21 2023 Remi Collet <remi@remirepo.net> - 3.0.5-3 +- use SPDX license ID + +* Wed Sep 14 2022 Remi Collet <remi@remirepo.net> - 3.0.5-1 +- update to 3.0.5 +- sources from git snapshot + +* Wed Sep 14 2022 Remi Collet <remi@remirepo.net> - 3.0.4-1 +- update to 3.0.4 + +* Mon Nov 30 2020 Remi Collet <remi@remirepo.net> - 3.0.3-1 +- update to 3.0.3 (no change) +- switch to phpunit8 + +* Thu Jul 12 2018 Remi Collet <remi@remirepo.net> - 3.0.2-1 +- update to 3.0.2 + * Tue Jun 19 2018 Remi Collet <remi@remirepo.net> - 3.0.1-1 - update to 3.0.1 |