From d1044842af5ad9489d8982e390615675c45340b0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 5 Jan 2015 14:38:00 +0100 Subject: php-hamcrest: 1.2.0 - New package --- Makefile | 4 ++ autoload.php.in | 17 +++++++ bootstrap-autoload.patch | 18 ++++++++ php-hamcrest.spec | 113 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 152 insertions(+) create mode 100644 Makefile create mode 100644 autoload.php.in create mode 100644 bootstrap-autoload.patch create mode 100644 php-hamcrest.spec 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/autoload.php.in b/autoload.php.in new file mode 100644 index 0000000..2112c71 --- /dev/null +++ b/autoload.php.in @@ -0,0 +1,17 @@ +=5.3.2" +BuildRequires: php(language) >= 5.3.2 +# From phpcompatinfo report for 1.2.0 +BuildRequires: php-dom +BuildRequires: php-pcre +BuildRequires: php-spl + +Requires: php(language) >= 5.3.2 +# From phpcompatinfo report for 1.2.0 +Requires: php-dom +Requires: php-pcre +Requires: php-spl + +Provides: php-composer(hamcrest/hamcrest-php) = %{version} + + +%description +Hamcrest is a matching library originally written for Java, +but subsequently ported to many other languages. + +%{name} is the official PHP port of Hamcrest and essentially follows +a literal translation of the original Java API for Hamcrest, +with a few Exceptions, mostly down to PHP language barriers. + + +%prep +%setup -q -n %{gh_project}-%{gh_commit} + +%patch0 -p0 -b .rpm + +# Move to Library tree +mv hamcrest/Hamcrest.php hamcrest/Hamcrest/Hamcrest.php + + +%build +# Library autoloader +%{_bindir}/phpab \ + --template %{SOURCE1} \ + --output hamcrest/Hamcrest/autoload.php \ + hamcrest/Hamcrest + +# Test suite autoloader +%{_bindir}/phpab \ + --output tests/autoload.php \ + --exclude '*Test.php' \ + tests + + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_datadir}/php +cp -pr hamcrest/* %{buildroot}%{_datadir}/php + + +%check +%if %{with_tests} +cd tests +%{_bindir}/phpunit +%else +: Test suite disabled +%endif + + +%clean +rm -rf %{buildroot} + + +%files +%defattr(-,root,root,-) +%{!?_licensedir:%global license %%doc} +%license LICENSE.txt +%doc CHANGES.txt README.md composer.json TODO.txt +%{_datadir}/php/Hamcrest + + +%changelog +* Mon Jan 5 2015 Remi Collet - 1.2.0-1 +- initial package \ No newline at end of file -- cgit