summaryrefslogtreecommitdiffstats
path: root/php-liuggio-statsd-php-client.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-06-16 13:50:19 +0200
committerRemi Collet <fedora@famillecollet.com>2015-06-16 13:50:19 +0200
commit0906317ed69409bc398d0bda62f6e458b592daac (patch)
tree64205724913ee32df6683aa442c07329149bfdd6 /php-liuggio-statsd-php-client.spec
parent92666e19dd14f67a8699edeb623774d46da8321a (diff)
php-liuggio-statsd-php-client: fix packaging
Diffstat (limited to 'php-liuggio-statsd-php-client.spec')
-rw-r--r--php-liuggio-statsd-php-client.spec23
1 files changed, 23 insertions, 0 deletions
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 <remi@remirepo.net> - 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 <mike@cchtml.com> - 1.0.16-1
- Initial package