2 # - use external igbinary and make it's dependency optional
5 %bcond_without phpdoc # build phpdoc package
6 %bcond_without tests # build without tests
8 # build "phpdoc" only for 7.3 version on pld builders
9 %if 0%{?_pld_builder:1} && "%{?php_suffix}" != "73"
13 %define php_name php%{?php_suffix}
15 Summary: %{modname} A PHP extension for Redis
16 Name: %{php_name}-%{modname}
20 Group: Development/Languages/PHP
21 Source0: https://github.com/phpredis/phpredis/tarball/%{version}/%{modname}-%{version}.tar.gz
22 # Source0-md5: e2664b39d94f5f72f2e6ac27db92bc70
23 Source1: https://github.com/ukko/phpredis-phpdoc/archive/9ec1795bcd45ec83a19b46cf9a8b78b4e4d7ac80/%{modname}-phpdoc.tar.gz
24 # Source1-md5: eaba2e5fad040e2f4526374c073ae5f7
25 URL: https://github.com/phpredis/phpredis
26 BuildRequires: %{php_name}-devel >= 4:5.0.4
27 BuildRequires: %{php_name}-cli
28 BuildRequires: %{php_name}-pcre
29 BuildRequires: %{php_name}-session
30 BuildRequires: %{php_name}-simplexml
33 BuildRequires: rpmbuild(macros) >= 1.519
34 %{?requires_php_extension}
35 Requires: %{php_name}-session
36 Provides: php(%{modname}) = %{version}
37 Obsoletes: php-redis < 2.2.5-1
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 The phpredis extension provides an API for communicating with the
42 Redis key-value store.
44 This extension also provides session support.
46 %package -n php-redis-phpdoc
47 Summary: @phpdoc extension PHP for IDE autocomplete
49 URL: https://github.com/ukko/phpredis-phpdoc
53 %description -n php-redis-phpdoc
54 @phpdoc extension PHP for IDE autocomplete.
58 mv phpredis-phpredis-*/* .
59 mv phpredis-phpdoc-* phpdoc
66 # simple module load test
68 -dextension_dir=modules \
69 -dextension=%{php_extensiondir}/pcre.so \
70 -dextension=%{php_extensiondir}/spl.so \
71 -dextension=%{php_extensiondir}/simplexml.so \
72 -dextension=%{php_extensiondir}/session.so \
73 -dextension=%{modname}.so \
75 grep %{modname} modules.log
78 rm -rf $RPM_BUILD_ROOT
80 EXTENSION_DIR=%{php_extensiondir} \
81 INSTALL_ROOT=$RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
84 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
85 ; Enable %{modname} extension module
86 extension=%{modname}.so
89 install -d $RPM_BUILD_ROOT%{_examplesdir}/php-%{modname}-%{version}
90 cp -a phpdoc/src/*.php $RPM_BUILD_ROOT%{_examplesdir}/php-%{modname}-%{version}
93 rm -rf $RPM_BUILD_ROOT
96 %php_webserver_restart
100 %php_webserver_restart
104 %defattr(644,root,root,755)
105 %doc CREDITS README.markdown
106 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
107 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
110 %files -n php-redis-phpdoc
111 %defattr(644,root,root,755)
112 %{_examplesdir}/php-%{modname}-%{version}