summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--composer.json52
-rw-r--r--psysh.spec27
3 files changed, 82 insertions, 1 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..fd3b477
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,52 @@
+{
+ "name": "psy/psysh",
+ "description": "An interactive shell for modern PHP.",
+ "type": "library",
+ "keywords": ["console", "interactive", "shell", "repl"],
+ "homepage": "http://psysh.org",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Justin Hileman",
+ "email": "justin@justinhileman.info",
+ "homepage": "http://justinhileman.com"
+ }
+ ],
+ "require": {
+ "php": ">=5.3.9",
+ "symfony/console": "~2.3.10|^2.4.2|~3.0",
+ "symfony/var-dumper": "~2.7|~3.0",
+ "nikic/php-parser": "^1.2.1|~2.0",
+ "dnoegel/php-xdg-base-dir": "0.1",
+ "jakub-onderka/php-console-highlighter": "0.3.*"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~3.7|~4.0|~5.0",
+ "symfony/finder": "~2.1|~3.0",
+ "squizlabs/php_codesniffer": "~2.0",
+ "fabpot/php-cs-fixer": "~1.5"
+ },
+ "suggest": {
+ "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)",
+ "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.",
+ "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.",
+ "ext-pdo-sqlite": "The doc command requires SQLite to work."
+ },
+ "autoload": {
+ "files": ["src/Psy/functions.php"],
+ "psr-4": {
+ "Psy\\": "src/Psy/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Psy\\Test\\": "test/Psy/Test/"
+ }
+ },
+ "bin": ["bin/psysh"],
+ "extra": {
+ "branch-alias": {
+ "dev-develop": "0.8.x-dev"
+ }
+ }
+}
diff --git a/psysh.spec b/psysh.spec
index 6b57b3c..b52cbdc 100644
--- a/psysh.spec
+++ b/psysh.spec
@@ -1,3 +1,4 @@
+# remirepo spec file for psysh, from:
#
# Fedora spec file for psysh
#
@@ -55,6 +56,7 @@ Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{githu
# Update bin script to use generated autoloader
Patch0: %{name}-bin-autoload.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -171,6 +173,8 @@ AUTOLOAD
%install
+rm -rf %{buildroot}
+
: Library
mkdir -p %{buildroot}%{phpdir}
cp -rp src/* %{buildroot}%{phpdir}/
@@ -200,13 +204,31 @@ sed 's/function testFormat/function SKIP_testFormat/' \
sed 's/function testWriteReturnValue/function SKIP_testWriteReturnValue/' \
-i test/Psy/Test/ShellTest.php
-%{_bindir}/phpunit --verbose --bootstrap bootstrap.php
+run=0
+ret=0
+if which php56; then
+ php56 %{_bindir}/phpunit --bootstrap bootstrap.php || ret=1
+ run=1
+fi
+if which php71; then
+ php71 %{_bindir}/phpunit --bootstrap bootstrap.php || ret=1
+ run=1
+fi
+if [ $run -eq 0 ]; then
+ %{_bindir}/phpunit --verbose --bootstrap bootstrap.php
+fi
+exit $ret
%else
: Tests skipped
%endif
+%clean
+rm -rf %{buildroot}
+
+
%files
+%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -216,6 +238,9 @@ sed 's/function testWriteReturnValue/function SKIP_testWriteReturnValue/' \
%changelog
+* Thu Jul 21 2016 Remi Collet <remi@fedoraproject.org> - 0.7.2-2
+- backport for remi repository
+
* Wed Jul 20 2016 Shawn Iwinski <shawn@iwin.ski> - 0.7.2-2
- Add explicit php-cli dependency (bin script uses "#!/usr/bin/env php")