]> git.pld-linux.org Git - packages/php-pecl-redis.git/blame - php-redis.spec
update phpdoc to latest (9ec1795)
[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}
163e049e 11Version: 4.2.0
f2c23d87 12Release: 1
48db7d63
ER
13License: PHP 3.01
14Group: Development/Languages/PHP
7345c0d0 15Source0: https://github.com/phpredis/phpredis/tarball/%{version}/%{modname}-%{version}.tar.gz
163e049e 16# Source0-md5: e2664b39d94f5f72f2e6ac27db92bc70
7345c0d0
ER
17Source1: https://github.com/ukko/phpredis-phpdoc/archive/9ec1795bcd45ec83a19b46cf9a8b78b4e4d7ac80/%{modname}-phpdoc.tar.gz
18# Source1-md5: eaba2e5fad040e2f4526374c073ae5f7
19URL: https://github.com/phpredis/phpredis
67fa4b41 20BuildRequires: %{php_name}-devel >= 4:5.0.4
c61b27e4 21%if %{with tests}
7345c0d0 22BuildRequires: %{php_name}-cli
c61b27e4
AM
23BuildRequires: %{php_name}-pcre
24BuildRequires: %{php_name}-session
25BuildRequires: %{php_name}-simplexml
c61b27e4 26%endif
48db7d63
ER
27BuildRequires: rpmbuild(macros) >= 1.519
28%{?requires_php_extension}
67fa4b41 29Requires: %{php_name}-session
54d79b38 30Provides: php(%{modname}) = %{version}
e15e2353 31Obsoletes: php-redis < 2.2.5-1
48db7d63
ER
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35The phpredis extension provides an API for communicating with the
36Redis key-value store.
37
38This extension also provides session support.
39
40%prep
2b82b6de 41%setup -qc -a1
bc808e49 42mv phpredis-phpredis-*/* .
7345c0d0 43mv phpredis-phpdoc-* phpdoc
48db7d63
ER
44
45%build
46phpize
47%configure
48%{__make}
49
b91beefc
ER
50%if %{with tests}
51# simple module load test
52%{__php} -n \
53 -dextension_dir=modules \
fd0294ec 54 -dextension=%{php_extensiondir}/pcre.so \
b91beefc 55 -dextension=%{php_extensiondir}/spl.so \
fd0294ec 56 -dextension=%{php_extensiondir}/simplexml.so \
b91beefc
ER
57 -dextension=%{php_extensiondir}/session.so \
58 -dextension=%{modname}.so \
59 -m > modules.log
60grep %{modname} modules.log
61%endif
62
48db7d63
ER
63%install
64rm -rf $RPM_BUILD_ROOT
48db7d63
ER
65%{__make} install \
66 EXTENSION_DIR=%{php_extensiondir} \
67 INSTALL_ROOT=$RPM_BUILD_ROOT
68
69install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
70cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
71; Enable %{modname} extension module
72extension=%{modname}.so
73EOF
74
7345c0d0
ER
75install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
76cp -a phpdoc/src/*.php $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
77
48db7d63
ER
78%clean
79rm -rf $RPM_BUILD_ROOT
80
81%post
82%php_webserver_restart
83
84%postun
85if [ "$1" = 0 ]; then
86 %php_webserver_restart
87fi
88
89%files
90%defattr(644,root,root,755)
7345c0d0 91%doc CREDITS README.markdown
48db7d63
ER
92%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
93%attr(755,root,root) %{php_extensiondir}/%{modname}.so
7345c0d0 94%{_examplesdir}/%{name}-%{version}
This page took 0.101094 seconds and 4 git commands to generate.