diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-07-21 17:51:34 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-07-21 17:51:34 +0200 |
commit | 025abf2397aae35a8bc50f67b012de76e6a47ff8 (patch) | |
tree | 6dc54b7f20fbf3018b15387941548d94e81f4d8e | |
parent | da594bd866ab47d05f6b3084c5db1b9d4222bb0c (diff) |
php-dnoegel-php-xdg-base-dir: backport
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | composer.json | 17 | ||||
-rw-r--r-- | php-dnoegel-php-xdg-base-dir.spec | 29 |
3 files changed, 48 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..f6caf31 --- /dev/null +++ b/composer.json @@ -0,0 +1,17 @@ +{ + "name": "dnoegel/php-xdg-base-dir", + "description": "implementation of xdg base directory specification for php", + "type": "project", + "license": "MIT", + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "@stable" + }, + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + } +} diff --git a/php-dnoegel-php-xdg-base-dir.spec b/php-dnoegel-php-xdg-base-dir.spec index 12f96a6..def3d51 100644 --- a/php-dnoegel-php-xdg-base-dir.spec +++ b/php-dnoegel-php-xdg-base-dir.spec @@ -1,3 +1,4 @@ +# remirepo spec file for php-dnoegel-php-xdg-base-dir, from # # Fedora spec file for php-dnoegel-php-xdg-base-dir # @@ -35,6 +36,7 @@ License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # Tests %if %{with_tests} @@ -94,6 +96,8 @@ AUTOLOAD %install +rm -rf %{buildroot} + mkdir -p %{buildroot}%{phpdir}/XdgBaseDir cp -rp src/* %{buildroot}%{phpdir}/XdgBaseDir/ @@ -107,14 +111,32 @@ sed 's#rmdir\($runtimeDir\);#rmdir($runtimeDir); echo PHP_EOL,">>>>> runtimeDir= sed 's/function testGetRuntimeShouldDeleteDirsWithWrongPermission/function SKIP_testGetRuntimeShouldDeleteDirsWithWrongPermission/' \ -i tests/XdgTest.php -%{_bindir}/phpunit --verbose \ - --bootstrap %{buildroot}%{phpdir}/XdgBaseDir/autoload.php +run=0 +ret=0 +if which php56; then + php56 %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/XdgBaseDir/autoload.php || ret=1 + run=1 +fi +if which php71; then + php71 %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/XdgBaseDir/autoload.php || ret=1 + run=1 +fi +if [ $run -eq 0 ]; then + %{_bindir}/phpunit --verbose \ + --bootstrap %{buildroot}%{phpdir}/XdgBaseDir/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 @@ -123,5 +145,8 @@ sed 's/function testGetRuntimeShouldDeleteDirsWithWrongPermission/function SKIP_ %changelog +* Thu Jul 21 2016 Remi Collet <remi@fedoraproject.org> - 0.1-1 +- backport for remi repository + * Fri Jul 15 2016 Shawn Iwinski <shawn@iwin.ski> - 0.1-1 - Initial package |