]> git.pld-linux.org Git - packages/php-pecl-xmlrpc.git/blob - php-pecl-xmlrpc.spec
Update build hack with xmlrpc-epi from php.spec
[packages/php-pecl-xmlrpc.git] / php-pecl-xmlrpc.spec
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
9 Summary:        xmlrpc extension module for PHP
10 Summary(pl.UTF-8):      Moduł xmlrpc dla PHP
11 Name:           %{php_name}-pecl-%{modname}
12 Version:        1.0.0
13 Release:        0.%{rel}.%{commit}
14 License:        PHP 3.01
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
24 BuildRequires:  xmlrpc-epi-devel >= 0.54.1
25 %if %{with tests}
26 BuildRequires:  %{php_name}-cli
27 BuildRequires:  %{php_name}-pcre
28 %endif
29 %{?requires_php_extension}
30 Provides:       php(xmlrpc) = %{version}
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 This is a dynamic shared object (DSO) for PHP that will add XMLRPC
35 support.
36
37 %description -l pl.UTF-8
38 Moduł PHP dodający obsługę XMLRPC.
39
40 %prep
41 %setup -qc
42 mv pecl-networking-%{modname}-*/* .
43
44 %{__sed} -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' config.m4
45
46 %build
47 export CPPFLAGS="%{rpmcppflags} -I%{_includedir}/xmlrpc-epi"
48
49 phpize
50 %configure \
51         --with-xmlrpc=shared,/usr \
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
60 grep %{modname} modules.log
61
62 %if %{with tests}
63 export 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
70 rm -rf $RPM_BUILD_ROOT
71 %{__make} install \
72         EXTENSION_DIR=%{php_extensiondir} \
73         INSTALL_ROOT=$RPM_BUILD_ROOT
74
75 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
76 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
77 ; Enable %{modname} extension module
78 extension=%{modname}.so
79 EOF
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %post
85 %php_webserver_restart
86
87 %postun
88 if [ "$1" = 0 ]; then
89         %php_webserver_restart
90 fi
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.068429 seconds and 3 git commands to generate.