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