From f36b93bc6ed8bfd8d5a257ba8c48d77bf791f47d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 11 May 2016 08:09:48 +0200 Subject: php-nikic-fast-route: import from Fedora --- php-nikic-fast-route-tests-autoloader.php | 10 +++ php-nikic-fast-route.spec | 110 ++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 php-nikic-fast-route-tests-autoloader.php create mode 100644 php-nikic-fast-route.spec diff --git a/php-nikic-fast-route-tests-autoloader.php b/php-nikic-fast-route-tests-autoloader.php new file mode 100644 index 0000000..c484d51 --- /dev/null +++ b/php-nikic-fast-route-tests-autoloader.php @@ -0,0 +1,10 @@ += 5.4 +BuildRequires: php-pcre +BuildRequires: php-spl +# From composer.json, "require-dev": { +# "phpunit/phpunit": "~4.0" +BuildRequires: php-composer(phpunit/phpunit) >= 4.0 +%endif + +# From composer.json, "require": { +# "php": ">=5.4", +Requires: php(language) >= 5.4 +# From phpcompatinfo 5.0.0 report for version 1.0.0 +Requires: php-pcre +Requires: php-spl + +Provides: php-composer(%{gh_owner}/%{pk_project}) = %{version} + + +%description +Fast implementation of a regular expression based router. + +Documentation: +http://nikic.github.io/2014/02/18/Fast-request-routing-using-regular-expressions.html + +Autoloader: %{php_home}/%{gh_project}/bootstrap.php + + +%prep +%setup -q -n %{gh_project}-%{gh_commit} + + +%build +#Nothing to build + + +%install +rm -rf %{buildroot} + +#: Library +mkdir -p %{buildroot}%{php_home} +cp -pr src %{buildroot}%{php_home}/%{gh_project} + + +%check +%if %{with_tests} +#ensure tests are not ran against local sources +rm -rf src +cp %{SOURCE1} test/bootstrap.php +sed -e "s|BUILDROOT_PATH|%{buildroot}/%{php_home}/%{gh_project}|" -i test/bootstrap.php + +: Upstream test suite +%{_bindir}/phpunit --verbose + +if which php70; then + php70 %{_bindir}/phpunit --verbose +fi +%else +: Test suite disabled +%endif + + +%clean +rm -rf %{buildroot} + + +%files +%defattr(-,root,root,-) +%{!?_licensedir:%global license %%doc} +%license LICENSE +%doc composer.json +%doc *.md +%{php_home}/%{gh_project} + + +%changelog +* Fri May 06 2016 Johan Cwiklinski - 1.0.0-2 +- Fix package name + +* Fri May 06 2016 Johan Cwiklinski - 1.0.0-1 +- Initial packaging -- cgit