]> git.pld-linux.org Git - packages/php-pecl-redis.git/blame - php-redis.spec
up to 2.2.5
[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
ER
11Version: 2.2.5
12Release: 1
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
67fa4b41
ER
17Source1: https://github.com/ukko/phpredis-phpdoc/tarball/master/%{modname}-phpdoc.tgz
18# Source1-md5: b7cce5ee29c6597e0fdd3557397e1b2a
48db7d63 19URL: https://github.com/nicolasff/phpredis
b91beefc 20%{?with_tests:BuildRequires: /usr/bin/php}
67fa4b41
ER
21BuildRequires: %{php_name}-devel >= 4:5.0.4
22%{?with_tests:BuildRequires: %{php_name}-session}
23%{?with_tests:BuildRequires: %{php_name}-simplexml}
48db7d63
ER
24BuildRequires: rpmbuild(macros) >= 1.519
25%{?requires_php_extension}
67fa4b41 26Requires: %{php_name}-session
48db7d63
ER
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30The phpredis extension provides an API for communicating with the
31Redis key-value store.
32
33This extension also provides session support.
34
35%prep
2b82b6de
ER
36%setup -qc -a1
37mv nicolasff-php%{modname}-*/* .
38mv ukko-phpredis-phpdoc-* phpdoc
48db7d63
ER
39
40%build
41phpize
42%configure
43%{__make}
44
b91beefc
ER
45%if %{with tests}
46# simple module load test
47%{__php} -n \
48 -dextension_dir=modules \
c37f9431 49 -dextension=%{php_extensiondir}/simplexml.so \
b91beefc
ER
50 -dextension=%{php_extensiondir}/spl.so \
51 -dextension=%{php_extensiondir}/session.so \
52 -dextension=%{modname}.so \
53 -m > modules.log
54grep %{modname} modules.log
55%endif
56
48db7d63
ER
57%install
58rm -rf $RPM_BUILD_ROOT
48db7d63
ER
59%{__make} install \
60 EXTENSION_DIR=%{php_extensiondir} \
61 INSTALL_ROOT=$RPM_BUILD_ROOT
62
63install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
64cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
65; Enable %{modname} extension module
66extension=%{modname}.so
67EOF
68
69%clean
70rm -rf $RPM_BUILD_ROOT
71
72%post
73%php_webserver_restart
74
75%postun
76if [ "$1" = 0 ]; then
77 %php_webserver_restart
78fi
79
80%files
81%defattr(644,root,root,755)
2b82b6de 82%doc CREDITS README.markdown phpdoc
48db7d63
ER
83%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
84%attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.075188 seconds and 4 git commands to generate.