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