packages: php-redis/php-redis.spec - ext load test, requires session

glen glen at pld-linux.org
Fri Oct 14 08:36:02 CEST 2011


Author: glen                         Date: Fri Oct 14 06:36:02 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- ext load test, requires session

---- Files affected:
packages/php-redis:
   php-redis.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/php-redis/php-redis.spec
diff -u packages/php-redis/php-redis.spec:1.1 packages/php-redis/php-redis.spec:1.2
--- packages/php-redis/php-redis.spec:1.1	Fri Oct 14 08:31:53 2011
+++ packages/php-redis/php-redis.spec	Fri Oct 14 08:35:57 2011
@@ -1,4 +1,8 @@
 # $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without	tests		# build without tests
+
 %define		modname	redis
 Summary:	%{modname} A PHP extension for Redis
 Name:		php-%{modname}
@@ -9,9 +13,12 @@
 Source0:	https://github.com/nicolasff/phpredis/tarball/%{version}#/%{name}-%{version}.tgz
 # Source0-md5:	eb2bee7e42f7a32a38c2a45377f21086
 URL:		https://github.com/nicolasff/phpredis
+%{?with_tests:BuildRequires:	/usr/bin/php}
 BuildRequires:	php-devel >= 4:5.0.4
+%{?with_tests:BuildRequires:	php-session}
 BuildRequires:	rpmbuild(macros) >= 1.519
 %{?requires_php_extension}
+Requires:	php-session
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -29,9 +36,19 @@
 %configure
 %{__make}
 
+%if %{with tests}
+# simple module load test
+%{__php} -n \
+	-dextension_dir=modules \
+	-dextension=%{php_extensiondir}/spl.so \
+	-dextension=%{php_extensiondir}/session.so \
+	-dextension=%{modname}.so \
+	-m > modules.log
+grep %{modname} modules.log
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %{__make} install \
 	EXTENSION_DIR=%{php_extensiondir} \
 	INSTALL_ROOT=$RPM_BUILD_ROOT
@@ -65,5 +82,8 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2011/10/14 06:35:57  glen
+- ext load test, requires session
+
 Revision 1.1  2011/10/14 06:31:53  glen
 - new
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/php-redis/php-redis.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list