commit b963a42b5e12f1d6591a0719ab29e071a1329d98
Author: Elan Ruusamäe <[email protected]>
Date:   Wed Jun 11 10:56:20 2014 +0300

    add module load test

 php-pecl-sasl.spec | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/php-pecl-sasl.spec b/php-pecl-sasl.spec
index 90fb483..cc7c5c2 100644
--- a/php-pecl-sasl.spec
+++ b/php-pecl-sasl.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without tests           # build without tests
+
 %define                php_name        php%{?php_suffix}
 %define                modname sasl
 %define                status          alpha
@@ -17,6 +21,7 @@ URL:          http://pecl.php.net/package/sasl/
 BuildRequires: %{php_name}-devel >= 3:5.0.4
 BuildRequires: cyrus-sasl-devel
 BuildRequires: rpmbuild(macros) >= 1.650
+%{?with_tests:BuildRequires:   %{php_name}-cli}
 %{?requires_php_extension}
 Provides:      php(%{modname}) = %{version}
 Obsoletes:     php-pecl-sasl < 0.1.0-14
@@ -61,6 +66,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-sasl.git/commitdiff/b963a42b5e12f1d6591a0719ab29e071a1329d98

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

Reply via email to