[packages/php-pecl-archive] add module load test

glen glen at pld-linux.org
Thu Jun 12 17:13:26 CEST 2014


commit 976653d57166fc869428b5e98294930492794412
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Jun 12 18:13:18 2014 +0300

    add module load test

 php-pecl-archive.spec | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/php-pecl-archive.spec b/php-pecl-archive.spec
index eb8253e..b86a4c2 100644
--- a/php-pecl-archive.spec
+++ b/php-pecl-archive.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without	tests		# build without tests
+
 %define		php_name	php%{?php_suffix}
 %define		modname		archive
 %define		status		beta
@@ -15,6 +19,7 @@ URL:		http://pecl.php.net/package/archive/
 BuildRequires:	%{php_name}-devel >= 3:5.0.4
 BuildRequires:	libarchive-devel
 BuildRequires:	rpmbuild(macros) >= 1.650
+%{?with_tests:BuildRequires:	%{php_name}-cli}
 %{?requires_php_extension}
 Provides:	php(%{modname}) = %{version}
 Obsoletes:	php-pecl-archive < 0.2-17
@@ -42,6 +47,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}}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-archive.git/commitdiff/976653d57166fc869428b5e98294930492794412



More information about the pld-cvs-commit mailing list