]> git.pld-linux.org Git - packages/php-pecl-igbinary.git/blame - php-pecl-igbinary.spec
- tests need pcre and session exts
[packages/php-pecl-igbinary.git] / php-pecl-igbinary.spec
CommitLineData
2d54e314
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
5%define modname igbinary
6Summary: Replacement for the standard PHP serializer
7Name: php-pecl-%{modname}
8Version: 1.1.1
9cf2dbcd 9Release: 2
2d54e314
ER
10License: BSD
11Group: Libraries
12URL: http://pecl.php.net/package/igbinary
13Source0: 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
17Source1: https://github.com/igbinary/igbinary/tarball/1.1.1/tests#/%{modname}-tests.tgz
18# Source1-md5: b171ba8b230f6de3e7095500515fc6bb
19Source2: %{modname}.ini
20Patch0: apc-modname.patch
21%{?with_tests:BuildRequires: /usr/bin/php}
22BuildRequires: php-devel >= 4:5.2.0
9cf2dbcd 23%{?with_tests:BuildRequires: php-pcre}
2d54e314
ER
24%{?with_tests:BuildRequires: php-pecl-APC}
25#BuildRequires: php-pecl-apc-devel >= 3.1.7
9cf2dbcd 26%{?with_tests:BuildRequires: php-session}
2d54e314
ER
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30Igbinary is a drop in replacement for the standard PHP serializer.
31
32Instead of time and space consuming textual representation, igbinary
33stores PHP data structures in a compact binary form. Savings are
34significant when using memcached or similar memory based storages for
35serialized data.
36
37%package devel
38Summary: Igbinary developer files (header)
39Group: Development/Libraries
40Requires: php-devel
41# does not require base
42
43%description devel
44These are the files needed to compile programs using Igbinary
45
46%prep
47%setup -qc -a1
48mv %{modname}-%{version}/* .
49mv igbinary-igbinary-bef0aca/tests .
50%patch0 -p1
51
52%build
53phpize
54%configure
55%{__make}
56
57%if %{with tests}
58# APC required for test 045
59
60# simple module load test
61# without APC to ensure than can run without
62%{__php} -n \
63 -dextension_dir=modules \
64 -dextension=%{php_extensiondir}/spl.so \
65 -dextension=%{php_extensiondir}/session.so \
66 -dextension=%{modname}.so \
67 -m > modules.log
68grep %{modname} modules.log
69
70cat <<'EOF' > run-tests.sh
71#!/bin/sh
72%{__make} test \
73 PHP_TEST_SHARED_SYSTEM_EXTENSIONS="pcre spl session" \
74 RUN_TESTS_SETTINGS="-q $*"
75EOF
76
77chmod +x run-tests.sh
78./run-tests.sh -w failed.log --show-out
79test -f failed.log -a ! -s failed.log
80%endif
81
82%install
83rm -rf $RPM_BUILD_ROOT
84install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
85%{__make} install \
86 EXTENSION_DIR=%{php_extensiondir} \
87 INSTALL_ROOT=$RPM_BUILD_ROOT
88
89cp -p %{SOURCE2} $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
90
91%clean
92rm -rf $RPM_BUILD_ROOT
93
94%files
95%defattr(644,root,root,755)
96%doc COPYING CREDITS NEWS README
97%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
98%attr(755,root,root) %{php_extensiondir}/%{modname}.so
99
100%files devel
101%defattr(644,root,root,755)
102%{_includedir}/php/ext/%{modname}
This page took 0.036831 seconds and 4 git commands to generate.