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