]> git.pld-linux.org Git - packages/php-pecl-redis.git/blame - php-redis.spec
fix self-test
[packages/php-pecl-redis.git] / php-redis.spec
CommitLineData
2b82b6de
ER
1# TODO
2# - use external igbinary and make it's dependency optional
b91beefc
ER
3#
4# Conditional build:
5%bcond_without tests # build without tests
6
67fa4b41 7%define php_name php%{?php_suffix}
48db7d63
ER
8%define modname redis
9Summary: %{modname} A PHP extension for Redis
67fa4b41 10Name: %{php_name}-%{modname}
d3d2f6ca 11Version: 2.2.5
fd0294ec 12Release: 4
48db7d63
ER
13License: PHP 3.01
14Group: Development/Languages/PHP
d3d2f6ca
ER
15Source0: https://github.com/nicolasff/phpredis/tarball/%{version}/%{modname}-%{version}.tar.gz
16# Source0-md5: 0e82aed77f2c23a9072b277ecdef6dba
12140a38
ER
17Source1: https://github.com/ukko/phpredis-phpdoc/tarball/master/%{modname}-phpdoc.tar.gz
18# Source1-md5: 9667e1b2976826915044e3a642847625
48db7d63 19URL: https://github.com/nicolasff/phpredis
67fa4b41 20BuildRequires: %{php_name}-devel >= 4:5.0.4
fd0294ec 21%{?with_tests:BuildRequires: %{php_name}-pcre}
67fa4b41
ER
22%{?with_tests:BuildRequires: %{php_name}-session}
23%{?with_tests:BuildRequires: %{php_name}-simplexml}
e15e2353 24%{?with_tests:BuildRequires: /usr/bin/php}
48db7d63
ER
25BuildRequires: rpmbuild(macros) >= 1.519
26%{?requires_php_extension}
67fa4b41 27Requires: %{php_name}-session
54d79b38 28Provides: php(%{modname}) = %{version}
e15e2353 29Obsoletes: php-redis < 2.2.5-1
48db7d63
ER
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33The phpredis extension provides an API for communicating with the
34Redis key-value store.
35
36This extension also provides session support.
37
38%prep
2b82b6de
ER
39%setup -qc -a1
40mv nicolasff-php%{modname}-*/* .
41mv ukko-phpredis-phpdoc-* phpdoc
48db7d63
ER
42
43%build
44phpize
45%configure
46%{__make}
47
b91beefc
ER
48%if %{with tests}
49# simple module load test
50%{__php} -n \
51 -dextension_dir=modules \
fd0294ec 52 -dextension=%{php_extensiondir}/pcre.so \
b91beefc 53 -dextension=%{php_extensiondir}/spl.so \
fd0294ec 54 -dextension=%{php_extensiondir}/simplexml.so \
b91beefc
ER
55 -dextension=%{php_extensiondir}/session.so \
56 -dextension=%{modname}.so \
57 -m > modules.log
58grep %{modname} modules.log
59%endif
60
48db7d63
ER
61%install
62rm -rf $RPM_BUILD_ROOT
48db7d63
ER
63%{__make} install \
64 EXTENSION_DIR=%{php_extensiondir} \
65 INSTALL_ROOT=$RPM_BUILD_ROOT
66
67install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
68cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
69; Enable %{modname} extension module
70extension=%{modname}.so
71EOF
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
76%post
77%php_webserver_restart
78
79%postun
80if [ "$1" = 0 ]; then
81 %php_webserver_restart
82fi
83
84%files
85%defattr(644,root,root,755)
2b82b6de 86%doc CREDITS README.markdown phpdoc
48db7d63
ER
87%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
88%attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.092443 seconds and 4 git commands to generate.