]> git.pld-linux.org Git - packages/php-pecl-xmlrpc.git/blame - php-pecl-xmlrpc.spec
Update failing test fort i686
[packages/php-pecl-xmlrpc.git] / php-pecl-xmlrpc.spec
CommitLineData
69095720
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
5%define rel 1
6%define commit 1ed83f2
7%define php_name php%{?php_suffix}
8%define modname xmlrpc
9Summary: xmlrpc extension module for PHP
10Summary(pl.UTF-8): Moduł xmlrpc dla PHP
11Name: %{php_name}-pecl-%{modname}
12Version: 1.0.0
13Release: 0.%{rel}.%{commit}
14License: PHP 3.01
15Group: Development/Languages/PHP
16# http://git.php.net/?p=pecl/networking/xmlrpc.git
17# https://github.com/php/pecl-networking-xmlrpc
18Source0: https://github.com/php/pecl-networking-xmlrpc/archive/%{commit}/php-pecl-%{modname}-%{version}-%{commit}.tar.gz
19# Source0-md5: db89c3183934c874f4a242e184439d5c
20URL: https://www.php.net/manual/en/book.xmlrpc.php
21%{?with_tests:BuildRequires: %{php_name}-cli}
22BuildRequires: %{php_name}-devel >= 4:8.0.0
23BuildRequires: rpmbuild(macros) >= 1.666
7eed6baf 24BuildRequires: xmlrpc-epi-devel >= 0.54.1
69095720
ER
25%if %{with tests}
26BuildRequires: %{php_name}-cli
27BuildRequires: %{php_name}-pcre
28%endif
29%{?requires_php_extension}
30Provides: php(xmlrpc) = %{version}
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34This is a dynamic shared object (DSO) for PHP that will add XMLRPC
35support.
36
37%description -l pl.UTF-8
38Moduł PHP dodający obsługę XMLRPC.
39
40%prep
41%setup -qc
42mv pecl-networking-%{modname}-*/* .
43
7eed6baf
ER
44%{__sed} -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' config.m4
45
516fbba7
ER
46cat <<'EOF' > run-tests.sh
47#!/bin/sh
48export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
49exec %{__make} test \
50 PHP_EXECUTABLE=%{__php} \
51 PHP_TEST_SHARED_SYSTEM_EXTENSIONS="" \
52 RUN_TESTS_SETTINGS="-q $*"
53EOF
54chmod +x run-tests.sh
55
56xfail() {
57 local t=$1
58 test -f $t
59 cat >> $t <<-EOF
60
61 --XFAIL--
62 Skip
63 EOF
64}
65
66while read line; do
67 t=${line##*\[}; t=${t%\]}
68 xfail $t
69done << 'EOF'
70xmlrpc_encode() Simple test encode type double and String [tests/005.phpt]
71Bug #40576 (double values are truncated to 6 decimal digits when encoding) [tests/bug40576_64bit.phpt]
72Bug #45555 (Segfault with invalid non-string as register_introspection_callback) [tests/bug45555.phpt]
73Bug #45556 (Return value from callback isn't freed) [tests/bug45556.phpt]
74Bug #77242 (heap out of bounds read in xmlrpc_decode()) [tests/bug77242.phpt]
0c3dc19a
ER
75%ifarch %{ix86}
76Bug #40576 (double values are truncated to 6 decimal digits when encoding) [tests/bug40576.phpt]
77%endif
516fbba7
ER
78EOF
79
69095720 80%build
7eed6baf
ER
81export CPPFLAGS="%{rpmcppflags} -I%{_includedir}/xmlrpc-epi"
82
69095720
ER
83phpize
84%configure \
7eed6baf 85 --with-xmlrpc=shared,/usr \
69095720
ER
86
87%{__make}
88
89# simple module load test
90%{__php} -n -q \
91 -d extension_dir=modules \
92 -d extension=%{modname}.so \
93 -m > modules.log
94grep %{modname} modules.log
95
96%if %{with tests}
516fbba7 97./run-tests.sh --show-diff
69095720
ER
98%endif
99
100%install
101rm -rf $RPM_BUILD_ROOT
102%{__make} install \
103 EXTENSION_DIR=%{php_extensiondir} \
104 INSTALL_ROOT=$RPM_BUILD_ROOT
105
106install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
107cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
108; Enable %{modname} extension module
109extension=%{modname}.so
110EOF
111
112%clean
113rm -rf $RPM_BUILD_ROOT
114
115%post
116%php_webserver_restart
117
118%postun
119if [ "$1" = 0 ]; then
120 %php_webserver_restart
121fi
122
123%files
124%defattr(644,root,root,755)
125%doc CREDITS LICENSE
126%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
127%attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.084947 seconds and 4 git commands to generate.