diff options
author | Remi Collet <remi@remirepo.net> | 2017-11-14 14:46:16 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-11-14 14:46:16 +0100 |
commit | c797dee38c13b0f9902274119d648f9e9634fc1b (patch) | |
tree | e83bdb0019ca671c50327c2547b7f6a5d64970f6 | |
parent | 66be335bfb6c52d658c3028f9cd06f888936b3af (diff) |
sync with Fedora
-rw-r--r-- | php-Analog.spec | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/php-Analog.spec b/php-Analog.spec index b5cc1df..f6d8582 100644 --- a/php-Analog.spec +++ b/php-Analog.spec @@ -7,25 +7,25 @@ # # Please preserve changelog entries # -%global gh_owner jbroadway -%global gh_project analog -%global gh_commit 9e02358735912ed203c073d192b5e07cb6b663dd -%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -#global gh_date 20150213 -%global real_name Analog +%global commit 9e02358735912ed203c073d192b5e07cb6b663dd +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global real_name Analog +%global minus_name analog + +%global devver 0 Name: php-Analog Summary: PHP micro logging package Version: 1.0.9 -%if 0%{?gh_date} -Release: 5.%{gh_date}git%{gh_short}%{?dist} +%if %{devver} +Release: 9.git%{shortcommit}%{?dist} %else -Release: 2%{?dist} +Release: 3%{?dist} %endif +Source0: https://github.com/jbroadway/%{real_name}/archive/%{commit}/%{minus_name}-%{version}-%{shortcommit}.tar.gz +URL: https://github.com/jbroadway/analog License: MIT Group: Development/Libraries -URL: https://github.com/jbroadway/analog -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -87,7 +87,7 @@ Autoloader: %{_datadir}/php/%{real_name}/autoload.php %prep -%setup -qn %{gh_project}-%{gh_commit} +%setup -qn %{minus_name}-%{commit} %build @@ -113,28 +113,20 @@ cp -a lib/%{real_name} %{buildroot}%{_datadir}/php/ %check +: Relax 1 test +sed -e 's/0600/%%d/' -i tests/AnalogTest.php + : Use and test our autoloader cat <<EOF | tee tests/bootstrap.php <?php require '%{buildroot}%{_datadir}/php/%{real_name}/autoload.php'; EOF +: Upstream test suite +%{_bindir}/phpunit --include-path=%{buildroot}%{_datadir}/php -: Run upstream test suite -run=0 -ret=0 -if which php56; then - php56 %{_bindir}/phpunit || ret=1 - run=1 +if which php70; then + php70 %{_bindir}/phpunit --include-path=%{buildroot}%{_datadir}/php fi -if which php71; then - php71 %{_bindir}/phpunit || ret=1 - run=1 -fi -if [ $run -eq 0 ]; then -%{_bindir}/phpunit --verbose -fi -exit $ret - %clean |