3 %bcond_without tests # build without tests
5 %define php_name php%{?php_suffix}
6 %define modname igbinary
7 Summary: Replacement for the standard PHP serializer
8 Name: %{php_name}-pecl-%{modname}
13 Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
14 # Source0-md5: 3755f17c73e7ef1fa022efd3b49d0573
15 Source2: %{modname}.ini
16 URL: http://pecl.php.net/package/igbinary
17 %{?with_tests:BuildRequires: %{php_name}-cli}
18 BuildRequires: %{php_name}-devel >= 4:5.2.0
19 %{?with_tests:BuildRequires: %{php_name}-pcre}
20 #%{?with_tests:BuildRequires: %{php_name}-pecl-APC}
21 %{?with_tests:BuildRequires: %{php_name}-session}
22 %{?with_tests:BuildRequires: %{php_name}-simplexml}
23 %{?with_tests:BuildRequires: %{php_name}-spl}
24 #BuildRequires: php-pecl-apc-devel >= 3.1.7
25 BuildRequires: rpmbuild(macros) >= 1.666
26 %{?requires_php_extension}
27 Requires: %{php_name}-session
28 Provides: php(%{modname}) = %{version}
29 Obsoletes: php-pecl-igbinary < 1.1.1-6
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 Igbinary is a drop in replacement for the standard PHP serializer.
35 Instead of time and space consuming textual representation, igbinary
36 stores PHP data structures in a compact binary form. Savings are
37 significant when using memcached or similar memory based storages for
41 Summary: Igbinary developer files (header)
42 Group: Development/Libraries
43 Requires: %{php_name}-devel
44 # does not require base
47 These are the files needed to compile programs using Igbinary
59 # APC required for test 045
61 # simple module load test
62 # without APC to ensure that can run without
64 -dextension_dir=modules \
65 -dextension=%{php_extensiondir}/pcre.so \
66 -dextension=%{php_extensiondir}/spl.so \
67 -dextension=%{php_extensiondir}/simplexml.so \
68 -dextension=%{php_extensiondir}/session.so \
69 -dextension=%{modname}.so \
71 grep %{modname} modules.log
73 cat <<'EOF' > run-tests.sh
76 PHP_EXECUTABLE=%{__php} \
77 PHP_TEST_SHARED_SYSTEM_EXTENSIONS="pcre spl simplexml session" \
78 RUN_TESTS_SETTINGS="-q $*"
82 ./run-tests.sh -w failed.log --show-out
83 test -f failed.log -a ! -s failed.log
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
90 EXTENSION_DIR=%{php_extensiondir} \
91 INSTALL_ROOT=$RPM_BUILD_ROOT
93 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/session_%{modname}.ini
96 rm -rf $RPM_BUILD_ROOT
99 %defattr(644,root,root,755)
100 %doc COPYING CREDITS NEWS README.md
101 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/*%{modname}.ini
102 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
105 %defattr(644,root,root,755)
106 %{_includedir}/php/ext/%{modname}