From ccaf7a922ba7c8c46be0233585b53f9d5512712d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 6 Oct 2016 08:25:37 +0200 Subject: php-webmozart-assert: add backport stuff --- Makefile | 4 ++++ composer.json | 34 ++++++++++++++++++++++++++++++++++ php-webmozart-assert.spec | 27 +++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 Makefile create mode 100644 composer.json 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..836ac72 --- /dev/null +++ b/composer.json @@ -0,0 +1,34 @@ +{ + "name": "webmozart/assert", + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": ["assert", "check", "validate"], + "license": "MIT", + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "require": { + "php": "^5.3.3|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Webmozart\\Assert\\Tests\\": "tests/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + } +} diff --git a/php-webmozart-assert.spec b/php-webmozart-assert.spec index 5f97c4a..493ccde 100644 --- a/php-webmozart-assert.spec +++ b/php-webmozart-assert.spec @@ -1,3 +1,4 @@ +# remirepo spec file for php-webmozart-assert, from # # Fedora spec file for php-webmozart-assert # @@ -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} @@ -105,20 +107,42 @@ AUTOLOAD %install +rm -rf %{buildroot} + mkdir -p %{buildroot}%{phpdir}/Webmozart/Assert cp -rp src/* %{buildroot}%{phpdir}/Webmozart/Assert/ %check %if %{with_tests} +# remirepo:11 +run=0 +ret=0 +if which php56; then + php56 %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/Webmozart/Assert/autoload.php || ret=1 + run=1 +fi +if which php71; then + php71 %{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/Webmozart/Assert/autoload.php || ret=1 + run=1 +fi +if [ $run -eq 0 ]; then %{_bindir}/phpunit --verbose \ --bootstrap %{buildroot}%{phpdir}/Webmozart/Assert/autoload.php +# remirepo:2 +fi +exit $ret %else : Tests skipped %endif +%clean +rm -rf %{buildroot} + + %files +%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -128,5 +152,8 @@ cp -rp src/* %{buildroot}%{phpdir}/Webmozart/Assert/ %changelog +* Thu Oct 6 2016 Remi Collet - 1.1.0-1 +- backport for remi repo, add EL-5 stuff + * Wed Sep 28 2016 Shawn Iwinski - 1.1.0-1 - Initial package -- cgit