]> git.pld-linux.org Git - packages/php-pecl-xmlrpc.git/commitdiff
new, pecl package for ext-xmlrpc
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 14 Oct 2020 19:45:07 +0000 (22:45 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Wed, 14 Oct 2020 19:45:44 +0000 (22:45 +0300)
php-pecl-xmlrpc.spec [new file with mode: 0644]

diff --git a/php-pecl-xmlrpc.spec b/php-pecl-xmlrpc.spec
new file mode 100644 (file)
index 0000000..1299a62
--- /dev/null
@@ -0,0 +1,91 @@
+#
+# Conditional build:
+%bcond_without tests           # build without tests
+
+%define                rel             1
+%define                commit  1ed83f2
+%define                php_name        php%{?php_suffix}
+%define                modname xmlrpc
+Summary:       xmlrpc extension module for PHP
+Summary(pl.UTF-8):     Moduł xmlrpc dla PHP
+Name:          %{php_name}-pecl-%{modname}
+Version:       1.0.0
+Release:       0.%{rel}.%{commit}
+License:       PHP 3.01
+Group:         Development/Languages/PHP
+# http://git.php.net/?p=pecl/networking/xmlrpc.git
+# https://github.com/php/pecl-networking-xmlrpc
+Source0:       https://github.com/php/pecl-networking-xmlrpc/archive/%{commit}/php-pecl-%{modname}-%{version}-%{commit}.tar.gz
+# Source0-md5: db89c3183934c874f4a242e184439d5c
+URL:           https://www.php.net/manual/en/book.xmlrpc.php
+%{?with_tests:BuildRequires:    %{php_name}-cli}
+BuildRequires: %{php_name}-devel >= 4:8.0.0
+BuildRequires: rpmbuild(macros) >= 1.666
+%if %{with tests}
+BuildRequires: %{php_name}-cli
+BuildRequires: %{php_name}-pcre
+%endif
+%{?requires_php_extension}
+Provides:      php(xmlrpc) = %{version}
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This is a dynamic shared object (DSO) for PHP that will add XMLRPC
+support.
+
+%description -l pl.UTF-8
+Moduł PHP dodający obsługę XMLRPC.
+
+%prep
+%setup -qc
+mv pecl-networking-%{modname}-*/* .
+
+%build
+phpize
+%configure \
+       --with-zlib-dir=shared,/usr \
+
+%{__make}
+
+# simple module load test
+%{__php} -n -q \
+       -d extension_dir=modules \
+       -d extension=%{modname}.so \
+       -m > modules.log
+grep %{modname} modules.log
+
+%if %{with tests}
+export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
+%{__make} test \
+       PHP_EXECUTABLE=%{__php} \
+       PHP_TEST_SHARED_SYSTEM_EXTENSIONS="" \
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install \
+       EXTENSION_DIR=%{php_extensiondir} \
+       INSTALL_ROOT=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
+; Enable %{modname} extension module
+extension=%{modname}.so
+EOF
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%php_webserver_restart
+
+%postun
+if [ "$1" = 0 ]; then
+       %php_webserver_restart
+fi
+
+%files
+%defattr(644,root,root,755)
+%doc CREDITS LICENSE
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
+%attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.216242 seconds and 4 git commands to generate.