From 0906317ed69409bc398d0bda62f6e458b592daac Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 16 Jun 2015 13:50:19 +0200 Subject: php-liuggio-statsd-php-client: fix packaging --- php-liuggio-statsd-php-client.spec | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/php-liuggio-statsd-php-client.spec b/php-liuggio-statsd-php-client.spec index afa0127..37cb7e8 100644 --- a/php-liuggio-statsd-php-client.spec +++ b/php-liuggio-statsd-php-client.spec @@ -14,11 +14,23 @@ Group: Development/Libraries License: MIT URL: https://github.com/liuggio/statsd-php-client Source0: https://github.com/liuggio/statsd-php-client/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source1: autoload.php Buildarch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# For tests +BuildRequires: %{_bindir}/phpunit +BuildRequires: php-composer(symfony/class-loader) +BuildRequires: php-composer(monolog/monolog) >= 1.2.0 +# From composer.json Requires: php(language) >= 5.3.2 +# From phpcompatinfo report for 1.0.16 +Requires: php-pcre +Requires: php-sockets +Requires: php-spl +# For our autoloader +Requires: php-composer(symfony/class-loader) Provides: php-composer(liuggio/statsd-php-client) = %{version} @@ -31,6 +43,8 @@ written in php. %prep %setup -qn statsd-php-client-%{version} +cp %{SOURCE1} src/Liuggio/StatsdClient/autoload.php + %build @@ -42,6 +56,12 @@ mkdir -pm 0755 %{buildroot}%{_datadir}/php/Liuggio/StatsdClient cp -rp src/Liuggio/StatsdClient/* %{buildroot}%{_datadir}/php/Liuggio/StatsdClient +%check +%{_bindir}/phpunit \ + --bootstrap=%{buildroot}%{_datadir}/php/Liuggio/StatsdClient/autoload.php \ + --verbose + + %clean rm -rf %{buildroot} @@ -57,6 +77,9 @@ rm -rf %{buildroot} %changelog * Tue Jun 16 2015 Remi Collet - 1.0.16-1 - add backport stuff for remirepo +- run test suite during build +- add missing dependencies +- add autoloader * Mon Jun 15 2015 Michael Cronenworth - 1.0.16-1 - Initial package -- cgit