2 # - use external igbinary and make it's dependency optional
5 %bcond_without tests # build without tests
8 Summary: %{modname} A PHP extension for Redis
13 Group: Development/Languages/PHP
14 Source0: https://github.com/nicolasff/phpredis/tarball/%{version}#/%{name}-%{version}.tgz
15 # Source0-md5: eb2bee7e42f7a32a38c2a45377f21086
16 Source1: https://github.com/ukko/phpredis-phpdoc/tarball/master/%{name}-phpdoc.tgz
17 # Source1-md5: 110fec82bf7699e7be195a2ec911f3c8
18 URL: https://github.com/nicolasff/phpredis
19 %{?with_tests:BuildRequires: /usr/bin/php}
20 BuildRequires: php-devel >= 4:5.0.4
21 %{?with_tests:BuildRequires: php-session}
22 %{?with_tests:BuildRequires: php-simplexml}
23 BuildRequires: rpmbuild(macros) >= 1.519
24 %{?requires_php_extension}
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 The phpredis extension provides an API for communicating with the
30 Redis key-value store.
32 This extension also provides session support.
36 mv nicolasff-php%{modname}-*/* .
37 mv ukko-phpredis-phpdoc-* phpdoc
45 # simple module load test
47 -dextension_dir=modules \
48 -dextension=%{php_extensiondir}/simplexml.so \
49 -dextension=%{php_extensiondir}/spl.so \
50 -dextension=%{php_extensiondir}/session.so \
51 -dextension=%{modname}.so \
53 grep %{modname} modules.log
57 rm -rf $RPM_BUILD_ROOT
59 EXTENSION_DIR=%{php_extensiondir} \
60 INSTALL_ROOT=$RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
63 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
64 ; Enable %{modname} extension module
65 extension=%{modname}.so
69 rm -rf $RPM_BUILD_ROOT
72 %php_webserver_restart
76 %php_webserver_restart
80 %defattr(644,root,root,755)
81 %doc CREDITS README.markdown phpdoc
82 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
83 %attr(755,root,root) %{php_extensiondir}/%{modname}.so