commit 95e4d0eca3c31c0d4a3121f7920f6cbb3899fac6
Author: Elan Ruusamäe <[email protected]>
Date:   Wed Jun 11 10:41:26 2014 +0300

    add module load test

 php-pecl-tcpwrap.spec | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/php-pecl-tcpwrap.spec b/php-pecl-tcpwrap.spec
index ca54955..35553b2 100644
--- a/php-pecl-tcpwrap.spec
+++ b/php-pecl-tcpwrap.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without tests           # build without tests
+
 %define                php_name        php%{?php_suffix}
 %define                modname tcpwrap
 %define                status          stable
@@ -15,6 +19,7 @@ URL:          http://pecl.php.net/package/tcpwrap/
 BuildRequires: %{php_name}-devel >= 3:5.0.4
 BuildRequires: libwrap-devel
 BuildRequires: rpmbuild(macros) >= 1.650
+%{?with_tests:BuildRequires:   %{php_name}-cli}
 %{?requires_php_extension}
 Provides:      php(%{modname}) = %{version}
 Obsoletes:     php-pecl-tcpwrap < 1.1.3-7
@@ -41,6 +46,15 @@ phpize
 %configure
 %{__make}
 
+%if %{with tests}
+# simple module load test
+%{__php} -n \
+       -dextension_dir=modules \
+       -dextension=%{modname}.so \
+       -m > modules.log
+grep %{modname} modules.log
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-tcpwrap.git/commitdiff/95e4d0eca3c31c0d4a3121f7920f6cbb3899fac6

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to