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