3 %bcond_without tests # build without tests
6 Summary: %{modname} A PHP extension for Redis
11 Group: Development/Languages/PHP
12 Source0: https://github.com/nicolasff/phpredis/tarball/%{version}#/%{name}-%{version}.tgz
13 # Source0-md5: eb2bee7e42f7a32a38c2a45377f21086
14 URL: https://github.com/nicolasff/phpredis
15 %{?with_tests:BuildRequires: /usr/bin/php}
16 BuildRequires: php-devel >= 4:5.0.4
17 %{?with_tests:BuildRequires: php-session}
18 BuildRequires: rpmbuild(macros) >= 1.519
19 %{?requires_php_extension}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 The phpredis extension provides an API for communicating with the
25 Redis key-value store.
27 This extension also provides session support.
31 mv *-php%{modname}-*/* .
39 # simple module load test
41 -dextension_dir=modules \
42 -dextension=%{php_extensiondir}/spl.so \
43 -dextension=%{php_extensiondir}/session.so \
44 -dextension=%{modname}.so \
46 grep %{modname} modules.log
50 rm -rf $RPM_BUILD_ROOT
52 EXTENSION_DIR=%{php_extensiondir} \
53 INSTALL_ROOT=$RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
56 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
57 ; Enable %{modname} extension module
58 extension=%{modname}.so
62 rm -rf $RPM_BUILD_ROOT
65 %php_webserver_restart
69 %php_webserver_restart
73 %defattr(644,root,root,755)
74 %doc CREDITS README.markdown
75 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
76 %attr(755,root,root) %{php_extensiondir}/%{modname}.so