]> git.pld-linux.org Git - packages/php-pecl-xmlrpc.git/blame - php-pecl-xmlrpc.spec
new, pecl package for ext-xmlrpc
[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
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
43%build
44phpize
45%configure \
46 --with-zlib-dir=shared,/usr \
47
48%{__make}
49
50# simple module load test
51%{__php} -n -q \
52 -d extension_dir=modules \
53 -d extension=%{modname}.so \
54 -m > modules.log
55grep %{modname} modules.log
56
57%if %{with tests}
58export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
59%{__make} test \
60 PHP_EXECUTABLE=%{__php} \
61 PHP_TEST_SHARED_SYSTEM_EXTENSIONS="" \
62%endif
63
64%install
65rm -rf $RPM_BUILD_ROOT
66%{__make} install \
67 EXTENSION_DIR=%{php_extensiondir} \
68 INSTALL_ROOT=$RPM_BUILD_ROOT
69
70install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
71cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
72; Enable %{modname} extension module
73extension=%{modname}.so
74EOF
75
76%clean
77rm -rf $RPM_BUILD_ROOT
78
79%post
80%php_webserver_restart
81
82%postun
83if [ "$1" = 0 ]; then
84 %php_webserver_restart
85fi
86
87%files
88%defattr(644,root,root,755)
89%doc CREDITS LICENSE
90%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
91%attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.036995 seconds and 4 git commands to generate.