commit 8dfd8797a4a6e5598f5a51bfa875ea63f5e6a40e
Author: Elan Ruusamäe <g...@delfi.ee>
Date:   Wed Nov 23 03:47:05 2016 +0200

    simple module load test

 php-pecl-memcache.spec | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
---
diff --git a/php-pecl-memcache.spec b/php-pecl-memcache.spec
index 3df2f04..06f542c 100644
--- a/php-pecl-memcache.spec
+++ b/php-pecl-memcache.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without tests           # build without tests
+
 %define                php_name        php%{?php_suffix}
 %define                modname memcache
 %define                php_min_version 5.0.0
@@ -23,6 +27,10 @@ BuildRequires:       %{php_name}-xml
 BuildRequires: php-packagexml2cl
 BuildRequires: rpm-php-pearprov >= 4.4.2-11
 BuildRequires: rpmbuild(macros) >= 1.650
+%if %{with tests}
+BuildRequires: %{php_name}-cli
+BuildRequires: %{php_name}-session
+%endif
 %{?requires_php_extension}
 Requires:      %{php_name}-session
 Requires:      %{php_name}-zlib
@@ -87,6 +95,16 @@ phpize
        --with-zlib-dir=/usr
 %{__make}
 
+%if %{with tests}
+# simple module load test
+%{__php} -n -q \
+       -d extension_dir=modules \
+       -d extension=%{php_extensiondir}/session.so \
+       -d extension=%{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},%{_examplesdir}/%{name}-%{version}}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-memcache.git/commitdiff/8dfd8797a4a6e5598f5a51bfa875ea63f5e6a40e

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to