You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
php-pear-XML-RPC2/php-pear-XML-RPC2.spec

152 lines
4.2 KiB
Plaintext

# spec file for php-pear-XML-RPC2
#
# Copyright (c) 2011-2014 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/3.0/
#
# Please, preserve the changelog entries
#
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
%{!?__pear: %global __pear %{_bindir}/pear}
%global pear_name XML_RPC2
Name: php-pear-XML-RPC2
Version: 1.1.2
Release: 1%{?dist}
Summary: XML-RPC client/server library
Group: Development/Libraries
License: LGPLv2+
URL: http://pear.php.net/package/XML_RPC2
Source0: http://pear.php.net/get/XML_RPC2-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-pear
Requires(post): %{__pear}
Requires(postun): %{__pear}
# From package.xml
Requires: php-pear(PEAR)
Requires: php-pear(Cache_Lite) >= 1.6.0
Requires: php-pear(HTTP_Request2) >= 0.6.0
# From phpcompatinfo report for version 1.1.2
Requires: php-date
Requires: php-dom
Requires: php-mbstring
Requires: php-pcre
Requires: php-simplexml
Requires: php-xmlrpc
Provides: php-pear(%{pear_name}) = %{version}
# Tests are only run with rpmbuild --with tests
# Can't be run in mock / koji because of network / dns
%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
%description
XML_RPC2 is a pear package providing XML_RPC client and server services.
XML-RPC is a simple remote procedure call protocol built using HTTP as
transport and XML as encoding.
As a client library, XML_RPC2 is capable of creating a proxy class which
exposes the methods exported by the server. As a server library, XML_RPC2
is capable of exposing methods from a class or object instance, seamlessly
exporting local methods as remotely callable procedures.
%prep
%setup -q -c
cd %{pear_name}-%{version}
# package.xml is V2
mv ../package.xml %{name}.xml
%build
cd %{pear_name}-%{version}
# Empty build section, most likely nothing required.
%install
rm -rf $RPM_BUILD_ROOT
cd %{pear_name}-%{version}
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
# Clean up unnecessary files
rm -rf $RPM_BUILD_ROOT%{pear_metadir}/.??*
# Install XML package description
mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
%clean
rm -rf $RPM_BUILD_ROOT
%post
%{__pear} install --nodeps --soft --force --register-only \
%{pear_xmldir}/%{name}.xml >/dev/null || :
%postun
if [ $1 -eq 0 ] ; then
%{__pear} uninstall --nodeps --ignore-errors --register-only \
pear.php.net/%{pear_name} >/dev/null || :
fi
%check
cd %{pear_name}-%{version}
%if %{with_tests}
PHPRC=../php.ini %{__pear} \
run-tests \
--recur \
-i "-d include_path=%{buildroot}%{pear_phpdir}:%{pear_phpdir}" \
tests | tee ../tests.log
grep "FAILED TESTS" ../tests.log && exit 1
%else
echo 'Test suite disabled (missing "--with tests" option)'
%endif
%files
%defattr(-,root,root,-)
%doc %{pear_docdir}/%{pear_name}
%{pear_xmldir}/%{name}.xml
%{pear_phpdir}/XML
%{pear_testdir}/%{pear_name}
%changelog
* Mon Mar 31 2014 Remi Collet <Fedora@FamilleCollet.com> 1.1.2-1
- Version 1.1.2 (stable)
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Feb 19 2013 Remi Collet <remi@fedoraproject.org> - 1.1.1-6
- fix metadata location
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Aug 14 2012 Remi Collet <remi@fedoraproject.org> - 1.1.1-4
- rebuilt for new pear_testdir
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Sat Jul 2 2011 Remi Collet <Fedora@FamilleCollet.com> 1.1.1-1
- Version 1.1.1 (stable) - API 1.0.5 (stable)
- move doc in /usr/share/doc/pear
* Sun Feb 13 2011 Remi Collet <Fedora@FamilleCollet.com> 1.0.6-1
- initial RPM (from generated and cleaned spec)