]> git.pld-linux.org Git - packages/php-redis.git/commitdiff
- ext load test, requires session auto/th/php-redis-2_1_3-1
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 14 Oct 2011 06:35:57 +0000 (06:35 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    php-redis.spec -> 1.2

php-redis.spec

index 9e221768bf21077501901a2222389f86da05c58a..a87cb0e4a2c60da2bc606c79edf537c9b0c12f95 100644 (file)
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without tests           # build without tests
+
 %define                modname redis
 Summary:       %{modname} A PHP extension for Redis
 Name:          php-%{modname}
@@ -8,9 +12,12 @@ Group:                Development/Languages/PHP
 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
@@ -28,9 +35,19 @@ phpize
 %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
This page took 0.077728 seconds and 5 git commands to generate.