diff options
author | Remi Collet <remi@remirepo.net> | 2019-06-07 09:41:20 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-06-07 09:41:20 +0200 |
commit | 8d99771b88524db2bf811b7ab0fb4ed23835625f (patch) | |
tree | ec2b2d354e2465330ba6a0bce5385baa3ec90780 | |
parent | 610934190112b0a5c83410c1a266ac141b7d25b8 (diff) |
php-myclabs-deep-copy19 for EL 6 and 7
-rw-r--r-- | php-myclabs-deep-copy.spec | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/php-myclabs-deep-copy.spec b/php-myclabs-deep-copy.spec index 68bf8ad..ab6c337 100644 --- a/php-myclabs-deep-copy.spec +++ b/php-myclabs-deep-copy.spec @@ -11,20 +11,27 @@ %global gh_owner myclabs %global gh_project DeepCopy %global c_project deep-copy +%global major %nil %global php_home %{_datadir}/php %global with_tests 0%{!?_without_tests:1} -Name: php-myclabs-deep-copy +# remirepo:4 +%if 0%{?fedora} < 26 && 0%{?rhel} < 8 +%global major 19 +%global with_tests 0 +%endif +Name: php-myclabs-deep-copy%{major} Version: 1.9.1 Release: 1%{?dist} + Summary: Create deep copies (clones) of your objects License: MIT URL: https://github.com/%{gh_owner}/%{gh_project} # git snashop to get upstream test suite -Source0: %{name}-%{version}-%{gh_short}.tgz +Source0: php-myclabs-deep-copy-%{version}-%{gh_short}.tgz Source1: makesrc.sh -Source2: %{name}-autoload.php +Source2: php-myclabs-deep-copy-autoload.php BuildArch: noarch %if %{with_tests} @@ -83,7 +90,7 @@ cp %{SOURCE2} src/%{gh_project}/autoload.php %install : Library mkdir -p %{buildroot}%{php_home} -cp -pr src/%{gh_project} %{buildroot}%{php_home}/%{gh_project} +cp -pr src/%{gh_project} %{buildroot}%{php_home}/%{gh_project}%{major} %check @@ -91,7 +98,7 @@ cp -pr src/%{gh_project} %{buildroot}%{php_home}/%{gh_project} mkdir vendor cat << 'EOF' | tee vendor/autoload.php <?php -require '%{buildroot}%{php_home}/%{gh_project}/autoload.php'; +require '%{buildroot}%{php_home}/%{gh_project}%{major}/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('DeepCopy\\', dirname(__DIR__).'/fixtures/'); \Fedora\Autoloader\Autoload::addPsr4('DeepCopyTest\\', dirname(__DIR__).'/tests/DeepCopyTest/'); require_once '%{php_home}/Doctrine/Common/Collections/autoload.php'; @@ -101,7 +108,7 @@ EOF ret=0 for cmd in php php71 php72 php73; do if which $cmd; then - $cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{gh_project}/autoload.php \ + $cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{gh_project}%{major}/autoload.php \ %{_bindir}/phpunit7 --verbose || ret=1 fi done @@ -117,10 +124,13 @@ exit $ret %license LICENSE %doc composer.json %doc README.md -%{php_home}/%{gh_project} +%{php_home}/%{gh_project}%{major} %changelog +* Fri Jun 7 2019 Remi Collet <remi@remirepo.net> - 1.9.1-1 +- php-myclabs-deep-copy19 for EL 6 and 7 + * Mon Apr 15 2019 Remi Collet <remi@remirepo.net> - 1.9.1-1 - update to 1.9.1 |