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

index ca54955291fd3e7dcfacae4beb3458ce258d0dd8..35553b2540a53930d6e2e5022c925fb81334472e 100644 (file)
@@ -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}}
This page took 0.0823 seconds and 4 git commands to generate.