3 %bcond_without tests # build without tests
7 %define php_name php%{?php_suffix}
9 Summary: xmlrpc extension module for PHP
10 Summary(pl.UTF-8): Moduł xmlrpc dla PHP
11 Name: %{php_name}-pecl-%{modname}
13 Release: 0.%{rel}.%{commit}
15 Group: Development/Languages/PHP
16 # http://git.php.net/?p=pecl/networking/xmlrpc.git
17 # https://github.com/php/pecl-networking-xmlrpc
18 Source0: https://github.com/php/pecl-networking-xmlrpc/archive/%{commit}/php-pecl-%{modname}-%{version}-%{commit}.tar.gz
19 # Source0-md5: db89c3183934c874f4a242e184439d5c
20 URL: https://www.php.net/manual/en/book.xmlrpc.php
21 %{?with_tests:BuildRequires: %{php_name}-cli}
22 BuildRequires: %{php_name}-devel >= 4:8.0.0
23 BuildRequires: rpmbuild(macros) >= 1.666
25 BuildRequires: %{php_name}-cli
26 BuildRequires: %{php_name}-pcre
28 %{?requires_php_extension}
29 Provides: php(xmlrpc) = %{version}
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 This is a dynamic shared object (DSO) for PHP that will add XMLRPC
36 %description -l pl.UTF-8
37 Moduł PHP dodający obsługę XMLRPC.
41 mv pecl-networking-%{modname}-*/* .
46 --with-zlib-dir=shared,/usr \
50 # simple module load test
52 -d extension_dir=modules \
53 -d extension=%{modname}.so \
55 grep %{modname} modules.log
58 export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
60 PHP_EXECUTABLE=%{__php} \
61 PHP_TEST_SHARED_SYSTEM_EXTENSIONS="" \
65 rm -rf $RPM_BUILD_ROOT
67 EXTENSION_DIR=%{php_extensiondir} \
68 INSTALL_ROOT=$RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
71 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
72 ; Enable %{modname} extension module
73 extension=%{modname}.so
77 rm -rf $RPM_BUILD_ROOT
80 %php_webserver_restart
84 %php_webserver_restart
88 %defattr(644,root,root,755)
90 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
91 %attr(755,root,root) %{php_extensiondir}/%{modname}.so