diff options
-rw-r--r-- | ResourceOperationsTest.php | 29 | ||||
-rw-r--r-- | composer.json | 4 | ||||
-rwxr-xr-x | makesrc.sh | 28 | ||||
-rw-r--r-- | php-sebastian-resource-operations2.spec | 43 |
4 files changed, 55 insertions, 49 deletions
diff --git a/ResourceOperationsTest.php b/ResourceOperationsTest.php deleted file mode 100644 index 0e0fcc0..0000000 --- a/ResourceOperationsTest.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php -/* - * This file is part of resource-operations. - * - * (c) Sebastian Bergmann <sebastian@phpunit.de> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace SebastianBergmann\ResourceOperations; - -use PHPUnit\Framework\TestCase; - -/** - * @covers SebastianBergmann\ResourceOperations\ResourceOperations - */ -class ResourceOperationsTest extends TestCase -{ - /** - * @covers SebastianBergmann\ResourceOperations\ResourceOperations::getFunctions - */ - public function testGetFunctions() - { - $tab = ResourceOperations::getFunctions(); - $this->assertTrue(is_array($tab), 'ResourceOperations::getFunctions does not return an array'); - $this->assertContains('zip_open', $tab); - } -} diff --git a/composer.json b/composer.json index 0e05865..733a3f8 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "php": "^7.1" + "php": ">=7.1" }, "autoload": { "classmap": [ @@ -26,7 +26,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.0" + "dev-master": "2.0-dev" } } } diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..3d8028d --- /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-resource-operations2.spec b/php-sebastian-resource-operations2.spec index ee10695..3cdbf8c 100644 --- a/php-sebastian-resource-operations2.spec +++ b/php-sebastian-resource-operations2.spec @@ -1,13 +1,13 @@ # remirepo/fedora spec file for php-sebastian-resource-operations2 # -# Copyright (c) 2015-2018 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2015-2024 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 756a75a44cb3164fd47435c36336e464c5028b34 +%global gh_commit 72a7f7674d053d548003b16ff5a106e7e0e06eee #global gh_date 20150728 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann @@ -23,17 +23,14 @@ %endif Name: php-sebastian-resource-operations%{major} -Version: 2.0.0 -%global specrel 1 -Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} -Summary: Provides a list of PHP built-in functions that operate on resources +Version: 2.0.3 +Release: 1%{?dist} +Summary: Provides a list of PHP built-in functions that operate on resources, version %{major} -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 - -# https://github.com/sebastianbergmann/resource-operations/pull/2 -Source1: https://raw.githubusercontent.com/remicollet/resource-operations/issue-tests/tests/ResourceOperationsTest.php +Source0: %{name}-%{version}-%{gh_short}.tgz +Source1: makesrc.sh BuildArch: noarch BuildRequires: php(language) >= 7.1 @@ -43,7 +40,7 @@ BuildRequires: phpunit7 %endif # from composer.json -# "php": "^7.1" +# "php": ">=7.1" Requires: php(language) >= 7.1 # Autoloader Requires: php-composer(fedora/autoloader) @@ -63,9 +60,6 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} -mkdir tests -cp %{SOURCE1} tests/ - %build # Generate the Autoloader @@ -80,9 +74,8 @@ cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major} %check %if %{with_tests} : Run upstream test suite -: Run upstream test suite ret=0 -for cmd in php php71 php72 php73; do +for cmd in php php81 php82 php83; do if which $cmd; then $cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \ %{_bindir}/phpunit7 --verbose tests || ret=1 @@ -103,6 +96,20 @@ exit $ret %changelog +* Fri Mar 1 2024 Remi Collet <remi@remirepo.net> - 2.0.3-1 +- update to 2.0.3 (no change) +- sources from git snapshot + +* Fri Apr 21 2023 Remi Collet <remi@remirepo.net> - 2.0.2-2 +- use SPDX License id + +* Mon Nov 30 2020 Remi Collet <remi@remirepo.net> - 2.0.2-1 +- update to 2.0.2 (no change) + +* Thu Oct 4 2018 Remi Collet <remi@remirepo.net> - 2.0.1-1 +- update to 2.0.1 +- drop patch merged upstream + * Fri Sep 28 2018 Remi Collet <remi@remirepo.net> - 2.0.0-1 - update to 2.0.0 - raise dependency on PHP 7.1 |