summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--php-iamcal-lib-autolink.spec31
2 files changed, 21 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/php-iamcal-lib-autolink.spec b/php-iamcal-lib-autolink.spec
index e81d93f..189c1f5 100644
--- a/php-iamcal-lib-autolink.spec
+++ b/php-iamcal-lib-autolink.spec
@@ -15,7 +15,7 @@
Name: php-iamcal-lib-autolink
Version: 1.7
-Release: 1%{?dist}
+Release: 4%{?dist}
Summary: Adds anchors to urls in a text
Group: Development/Libraries
@@ -25,7 +25,6 @@ Source0: %{name}-%{version}-%{gh_short}.tgz
# Used to retrieve a git snapshot with test suite
Source1: makesrc.sh
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# For tests
%if %{with_tests}
@@ -55,8 +54,6 @@ Autoloader: %{_datadir}/php/%{name}/autoload.php
%install
-rm -rf %{buildroot}
-
: Single file, only functions
install -Dpm 0644 lib_autolink.php %{buildroot}%{_datadir}/php/%{name}/lib_autolink.php
@@ -67,28 +64,23 @@ ln -s lib_autolink.php %{buildroot}%{_datadir}/php/%{name}/autoload.php
%check
%if %{with_tests}
-for unit in t/*.t; do
- %{_bindir}/php $unit | tee -a tests.log
+sed -e 's/\$this/$thiz/' -i t/testmore.php
+
+for cmd in php php56 php70 php71 php72; do
+ if which $cmd; then
+ for unit in t/*.t; do
+ $cmd $unit | tee -a tests.log
+ done
+ fi
done
-if which php70; then
- for unit in t/*.t; do
- php70 $unit | tee -a tests.log
- done
-fi
-
-grep -q '^not ok' tests.log && exit 1
+grep -q '^not ok' tests.log && exit 1 || exit 0
%else
: Test suite disabled
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -97,6 +89,9 @@ rm -rf %{buildroot}
%changelog
+* Thu Oct 5 2017 Remi Collet <remi@fedoraproject.org> - 1.7-4
+- fix tests for recent PHP, FTBFS from Koschei
+
* Tue Apr 26 2016 Remi Collet <remi@fedoraproject.org> - 1.7-1
- initial package, version 1.7