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