From b963a42b5e12f1d6591a0719ab29e071a1329d98 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 11 Jun 2014 10:56:20 +0300 Subject: [PATCH] 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}} -- 2.44.0