summaryrefslogtreecommitdiffstats
path: root/php-kdyby-events.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-08-04 16:23:03 +0200
committerRemi Collet <fedora@famillecollet.com>2016-08-04 16:23:03 +0200
commit2b435b9a79b86e750ceee26645ea26391795336b (patch)
treed2ab079734f2601085e7531c60ea8f1edf9d8cff /php-kdyby-events.spec
parent00f5dd86ed00acf733308023291659feb013ea3e (diff)
php-kdyby-events: 3.0.2
Diffstat (limited to 'php-kdyby-events.spec')
-rw-r--r--php-kdyby-events.spec36
1 files changed, 26 insertions, 10 deletions
diff --git a/php-kdyby-events.spec b/php-kdyby-events.spec
index a45025d..63bf4e2 100644
--- a/php-kdyby-events.spec
+++ b/php-kdyby-events.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit d8a0e8a64a59f501996f8f9591aa3f950208f091
+%global gh_commit 05de56c633167ed218939cfc8cdff984d78c0d9c
#global gh_date 20150728
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner kdyby
@@ -17,7 +17,7 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-%{gh_owner}-%{gh_project}
-Version: 2.4.1
+Version: 3.0.2
%global specrel 1
Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}
Summary: Events for Nette Framework
@@ -31,6 +31,10 @@ Source1: makesrc.sh
# Autoloader
Source2: %{name}-autoload.php
+# see https://github.com/Kdyby/Events/pull/103
+# fix for nette/tester > 2
+Patch0: %{name}-tester2.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
%if %{with_tests}
@@ -62,7 +66,7 @@ BuildRequires: php-composer(symfony/class-loader)
# "latte/latte": "~2.3@dev",
# "tracy/tracy": "~2.3@dev",
# "nette/utils": "~2.3@dev",
-# "symfony/event-dispatcher": "~2.3",
+# "symfony/event-dispatcher": "~2.3|~3.0",
# "nette/tester": "~1.4@",
# The framework is enough as it requires everything
BuildRequires: php-composer(nette/nette) >= 2.3
@@ -100,6 +104,7 @@ To use this library, you just have to add, in your project:
%setup -q -n %{gh_project}-%{gh_commit}
cp %{SOURCE2} src/%{ns_vendor}/%{ns_project}/autoload.php
+%patch0 -p0 -b .tester2
%build
@@ -114,8 +119,6 @@ cp -pr src/%{ns_vendor} %{buildroot}%{php_home}/%{ns_vendor}
%check
%if %{with_tests}
-: Generate configuration
-cat /etc/php.ini /etc/php.d/*ini >php.ini
export LANG=fr_FR.utf8
: Generate autoloader
@@ -130,12 +133,22 @@ EOF
php -r 'require "%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php";'
: Run test suite in sources tree
-nette-tester --colors 0 -p php -c ./php.ini tests -s
-
-if which php70; then
- cat /etc/opt/remi/php70/php.ini /etc/opt/remi/php70/php.d/*ini >php.ini
- php70 %{_bindir}/nette-tester --colors 0 -p php70 -c ./php.ini tests -s
+# remirepo:11
+ret=0
+run=0
+if which php56; then
+ php56 %{_bindir}/nette-tester --colors 0 -p php56 -C tests/KdybyTests -s || ret=1
+ run=1
+fi
+if which php71; then
+ php71 %{_bindir}/nette-tester --colors 0 -p php71 -C tests/KdybyTests -s || ret=1
+ run=1
fi
+if [ $run -eq 0 ]; then
+%{_bindir}/nette-tester --colors 0 -p php -C tests/KdybyTests -s
+# remirepo:2
+fi
+exit $ret
%else
: Test suite disabled
%endif
@@ -155,6 +168,9 @@ rm -rf %{buildroot}
%changelog
+* Thu Aug 4 2016 Remi Collet <remi@fedoraproject.org> - 3.0.2-1
+- update to 3.0.2 (for nette 2.4)
+
* Thu Apr 21 2016 Remi Collet <remi@fedoraproject.org> - 2.4.1-1
- update to 2.4.1
- run test suite with both PHP 5 and 7 when available