3 %bcond_without tests # build without tests
5 %define modname igbinary
6 Summary: Replacement for the standard PHP serializer
7 Name: php-pecl-%{modname}
12 URL: http://pecl.php.net/package/igbinary
13 Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
14 # Source0-md5: 4ad53115ed7d1d452cbe50b45dcecdf2
15 # http://pecl.php.net/bugs/22598
16 # https://github.com/igbinary/igbinary/tree/1.1.1/tests
17 Source1: https://github.com/igbinary/igbinary/tarball/1.1.1/tests#/%{modname}-tests.tgz
18 # Source1-md5: b171ba8b230f6de3e7095500515fc6bb
19 Source2: %{modname}.ini
20 Patch0: apc-modname.patch
21 %{?with_tests:BuildRequires: /usr/bin/php}
22 BuildRequires: php-devel >= 4:5.2.0
23 %{?with_tests:BuildRequires: php-pcre}
24 %{?with_tests:BuildRequires: php-pecl-APC}
25 #BuildRequires: php-pecl-apc-devel >= 3.1.7
26 %{?with_tests:BuildRequires: php-session}
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Igbinary is a drop in replacement for the standard PHP serializer.
33 Instead of time and space consuming textual representation, igbinary
34 stores PHP data structures in a compact binary form. Savings are
35 significant when using memcached or similar memory based storages for
39 Summary: Igbinary developer files (header)
40 Group: Development/Libraries
42 # does not require base
45 These are the files needed to compile programs using Igbinary
49 mv %{modname}-%{version}/* .
50 mv igbinary-igbinary-bef0aca/tests .
59 # APC required for test 045
61 # simple module load test
62 # without APC to ensure than can run without
64 -dextension_dir=modules \
65 -dextension=%{php_extensiondir}/spl.so \
66 -dextension=%{php_extensiondir}/session.so \
67 -dextension=%{modname}.so \
69 grep %{modname} modules.log
71 cat <<'EOF' > run-tests.sh
74 PHP_TEST_SHARED_SYSTEM_EXTENSIONS="pcre spl session" \
75 RUN_TESTS_SETTINGS="-q $*"
79 ./run-tests.sh -w failed.log --show-out
80 test -f failed.log -a ! -s failed.log
84 rm -rf $RPM_BUILD_ROOT
85 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
87 EXTENSION_DIR=%{php_extensiondir} \
88 INSTALL_ROOT=$RPM_BUILD_ROOT
90 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/session_%{modname}.ini
93 rm -rf $RPM_BUILD_ROOT
96 %defattr(644,root,root,755)
97 %doc COPYING CREDITS NEWS README
98 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/*%{modname}.ini
99 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
102 %defattr(644,root,root,755)
103 %{_includedir}/php/ext/%{modname}