summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--composer.json26
-rw-r--r--php-jakub-onderka-php-console-highlighter.spec29
3 files changed, 57 insertions, 2 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..91b0fd5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../common/Makefile
+
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..bd2f47a
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,26 @@
+{
+ "name": "jakub-onderka/php-console-highlighter",
+ "type": "library",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Jakub Onderka",
+ "email": "acci@acci.cz",
+ "homepage": "http://www.acci.cz/"
+ }
+ ],
+ "autoload": {
+ "psr-0": {"JakubOnderka\\PhpConsoleHighlighter": "src/"}
+ },
+ "require": {
+ "php": ">=5.3.0",
+ "jakub-onderka/php-console-color": "~0.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0",
+ "jakub-onderka/php-parallel-lint": "~0.5",
+ "jakub-onderka/php-var-dump-check": "~0.1",
+ "squizlabs/php_codesniffer": "~1.5",
+ "jakub-onderka/php-code-style": "~1.0"
+ }
+}
diff --git a/php-jakub-onderka-php-console-highlighter.spec b/php-jakub-onderka-php-console-highlighter.spec
index 90e7762..a3261fe 100644
--- a/php-jakub-onderka-php-console-highlighter.spec
+++ b/php-jakub-onderka-php-console-highlighter.spec
@@ -1,3 +1,4 @@
+# remirepo spec file for php-jakub-onderka-php-console-highlighter, from:
#
# Fedora spec file for php-jakub-onderka-php-console-highlighter
#
@@ -43,6 +44,7 @@ Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{githu
# https://patch-diff.githubusercontent.com/raw/JakubOnderka/PHP-Console-Highlighter/pull/11.patch
Patch0: %{name}-pr11-phpunit-createMock.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -111,20 +113,40 @@ AUTOLOAD
%install
+rm -rf %{buildroot}
+
mkdir -p %{buildroot}%{phpdir}
cp -rp src/* %{buildroot}%{phpdir}/
%check
%if %{with_tests}
-%{_bindir}/phpunit --verbose \
- --bootstrap %{buildroot}%{phpdir}/JakubOnderka/PhpConsoleHighlighter/autoload.php
+run=0
+ret=0
+if which php56; then
+ php56 %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/JakubOnderka/PhpConsoleHighlighter/autoload.php || ret=1
+ run=1
+fi
+if which php71; then
+ php71 %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/JakubOnderka/PhpConsoleHighlighter/autoload.php || ret=1
+ run=1
+fi
+if [ $run -eq 0 ]; then
+ %{_bindir}/phpunit --verbose \
+ --bootstrap %{buildroot}%{phpdir}/JakubOnderka/PhpConsoleHighlighter/autoload.php
+fi
+exit $ret
%else
: Tests skipped
%endif
+%clean
+rm -rf %{buildroot}
+
+
%files
+%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -133,5 +155,8 @@ cp -rp src/* %{buildroot}%{phpdir}/
%changelog
+* Thu Jul 21 2016 Remi Collet <remi@fedoraproject.org> - 0.3.2-1
+- backport for remi repository
+
* Fri Jul 15 2016 Shawn Iwinski <shawn@iwin.ski> - 0.3.2-1
- Initial package