]> git.pld-linux.org Git - packages/php-pecl-sasl.git/commitdiff
add module load test master auto/th/php-pecl-sasl-0.2.0-1
authorElan Ruusamäe <glen@delfi.ee>
Wed, 11 Jun 2014 07:56:20 +0000 (10:56 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 11 Jun 2014 07:56:20 +0000 (10:56 +0300)
php-pecl-sasl.spec

index 90fb48334ed65d050ecbc29553a94bacaaddb353..cc7c5c2346664f07f2568d1bd42fcad3c82eb749 100644 (file)
@@ -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}}
This page took 0.085692 seconds and 4 git commands to generate.