]> git.pld-linux.org Git - packages/php-pecl-memcache.git/commitdiff
simple module load test
authorElan Ruusamäe <glen@delfi.ee>
Wed, 23 Nov 2016 01:47:05 +0000 (03:47 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 23 Nov 2016 01:47:05 +0000 (03:47 +0200)
php-pecl-memcache.spec

index 3df2f04ac8a81d1f53ca3a42a4120405329c9f9b..06f542c553f4436fd742156f69731c78669a4fa3 100644 (file)
@@ -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}}
This page took 0.100764 seconds and 4 git commands to generate.