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 %{?with_tests:BuildRequires: php-simplexml}
19 BuildRequires: rpmbuild(macros) >= 1.519
20 %{?requires_php_extension}
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 The phpredis extension provides an API for communicating with the
26 Redis key-value store.
28 This extension also provides session support.
32 mv *-php%{modname}-*/* .
40 # simple module load test
42 -dextension_dir=modules \
43 -dextension=%{php_extensiondir}/spl.so \
44 -dextension=%{php_extensiondir}/session.so \
45 -dextension=%{modname}.so \
47 grep %{modname} modules.log
51 rm -rf $RPM_BUILD_ROOT
53 EXTENSION_DIR=%{php_extensiondir} \
54 INSTALL_ROOT=$RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
57 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
58 ; Enable %{modname} extension module
59 extension=%{modname}.so
63 rm -rf $RPM_BUILD_ROOT
66 %php_webserver_restart
70 %php_webserver_restart
74 %defattr(644,root,root,755)
75 %doc CREDITS README.markdown
76 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
77 %attr(755,root,root) %{php_extensiondir}/%{modname}.so