Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fddbf32d8c |
2 changed files with 16 additions and 10 deletions
|
|
@ -1,12 +1,12 @@
|
|||
# remirepo/fedora spec file for php-myclabs-php-enum
|
||||
#
|
||||
# Copyright (c) 2017-2021 Remi Collet
|
||||
# Copyright (c) 2017-2022 Remi Collet
|
||||
# License: CC-BY-SA
|
||||
# http://creativecommons.org/licenses/by-sa/4.0/
|
||||
#
|
||||
# Please, preserve the changelog entries
|
||||
#
|
||||
%global gh_commit b942d263c641ddb5190929ff840c68f78713e937
|
||||
%global gh_commit a867478eae49c9f59ece437ae7f9506bfaa27483
|
||||
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
||||
%global gh_owner myclabs
|
||||
%global gh_project php-enum
|
||||
|
|
@ -17,11 +17,12 @@
|
|||
%global ns_vendor MyCLabs
|
||||
%global ns_project Enum
|
||||
%global php_home %{_datadir}/php
|
||||
%global with_tests 0%{!?_without_tests:1}
|
||||
|
||||
%bcond_without tests
|
||||
|
||||
Name: php-%{pk_vendor}-%{pk_project}
|
||||
Version: 1.8.3
|
||||
Release: 2%{?dist}
|
||||
Version: 1.8.4
|
||||
Release: 1%{?dist}
|
||||
Summary: PHP Enum implementation
|
||||
|
||||
License: MIT
|
||||
|
|
@ -31,7 +32,7 @@ Source0: %{name}-%{version}-%{gh_short}.tgz
|
|||
Source1: makesrc.sh
|
||||
|
||||
BuildArch: noarch
|
||||
%if %{with_tests}
|
||||
%if %{with tests}
|
||||
# For tests
|
||||
BuildRequires: php(language) >= 7.3
|
||||
BuildRequires: php-reflection
|
||||
|
|
@ -70,11 +71,14 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}/autoload.php
|
|||
%prep
|
||||
%setup -q -n %{gh_project}-%{gh_commit}
|
||||
|
||||
mv stubs/Stringable.php src/
|
||||
|
||||
cat << 'EOF' | tee src/autoload.php
|
||||
<?php
|
||||
/* Autoloader for %{name} and its dependencies */
|
||||
require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
|
||||
\Fedora\Autoloader\Autoload::addPsr4('%{ns_vendor}\\%{ns_project}\\', __DIR__);
|
||||
require_once __DIR__ . '/Stringable.php';
|
||||
EOF
|
||||
|
||||
|
||||
|
|
@ -89,7 +93,7 @@ cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}
|
|||
|
||||
|
||||
%check
|
||||
%if %{with_tests}
|
||||
%if %{with tests}
|
||||
mkdir vendor
|
||||
cat << 'EOF' | tee tests/autoload.php
|
||||
<?php
|
||||
|
|
@ -99,7 +103,7 @@ require __DIR__ . '/bootstrap.php';
|
|||
EOF
|
||||
|
||||
ret=0
|
||||
for cmd in "php %{phpunit}" php73 php74 php80 php81; do
|
||||
for cmd in "php %{phpunit}" php74 php80 php81 php82; do
|
||||
if which $cmd; then
|
||||
set $cmd
|
||||
$1 ${2:-%{_bindir}/phpunit9} --verbose --bootstrap tests/autoload.php || ret=1
|
||||
|
|
@ -112,7 +116,6 @@ exit $ret
|
|||
|
||||
|
||||
%files
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license LICENSE
|
||||
%doc composer.json
|
||||
%doc README.md
|
||||
|
|
@ -121,6 +124,9 @@ exit $ret
|
|||
|
||||
|
||||
%changelog
|
||||
* Thu Aug 4 2022 Remi Collet <remi@remirepo.net> - 1.8.4-1
|
||||
- update to 1.8.4
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (php-myclabs-php-enum-1.8.3-b942d26.tgz) = 0aa384a587f8150ec56299043968a42bc0cac2c85204976bd57d9f0650d849458ec906ffa6568ed76f369bfadc81f06f2399cf3e1ad9dfdd3e673d71527186ef
|
||||
SHA512 (php-myclabs-php-enum-1.8.4-a867478.tgz) = 346b79cc80e4ef7446c08f7329000d72ab3a75101ff4d2575e9721b7ed7bf9ce6000d114292ebaca81d3b8631ecc28b00f5bc821cf4d7f79368c58f384bd38f3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue