File xmlrpc.spec of Package xmlrpc
#
# spec file for package xmlrpc
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: xmlrpc
Version: 3.1.3
Release: 0
Summary: Java XML-RPC implementation
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://ws.apache.org/xmlrpc/
Source0: http://archive.apache.org/dist/ws/xmlrpc/sources/apache-xmlrpc-%{version}-src.tar.bz2
Patch0: %{name}-client-addosgimanifest.patch
Patch1: %{name}-common-addosgimanifest.patch
Patch2: %{name}-javax-methods.patch
Patch3: %{name}-server-addosgimanifest.patch
Patch4: %{name}-disallow-deserialization-of-ex-serializable-tags.patch
Patch5: %{name}-disallow-loading-external-dtd.patch
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: maven-local
BuildRequires: mvn(commons-httpclient:commons-httpclient)
BuildRequires: mvn(commons-logging:commons-logging)
BuildRequires: mvn(javax.servlet:servlet-api)
BuildRequires: mvn(javax.xml.bind:jaxb-api)
BuildRequires: mvn(org.apache.ws.commons.util:ws-commons-util)
BuildRequires: mvn(org.apache:apache:pom:)
BuildArch: noarch
%description
Apache XML-RPC is a Java implementation of XML-RPC, a popular protocol
that uses XML over HTTP to implement remote procedure calls.
Apache XML-RPC was previously known as Helma XML-RPC. If you have code
using the Helma library, all you should have to do is change the import
statements in your code from helma.xmlrpc.* to org.apache.xmlrpc.*.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
Javadoc for %{name}.
%package common
Summary: Common classes for XML-RPC client and server implementations
# Provide xmlrpc is not here because it would be useless due to different jar names
%description common
%{summary}.
%package client
Summary: XML-RPC client implementation
%description client
%{summary}.
%package server
Summary: XML-RPC server implementation
%description server
%{summary}.
%prep
%setup -q -n apache-%{name}-%{version}-src
%patch -P 2 -p1
pushd client
%patch -P 0 -b .sav
popd
pushd common
%patch -P 1 -b .sav
popd
pushd server
%patch -P 3 -b .sav
popd
%patch -P 4 -p1
%patch -P 5 -p1
sed -i 's/\r//' LICENSE.txt
%pom_disable_module dist
%pom_remove_dep jaxme:jaxmeapi common
# This dep is no longer supplied by ws-commons-util
%pom_add_dep junit:junit:3.8.1:test
# add the jaxb-api dependency
%pom_add_dep javax.xml.bind:jaxb-api common
%pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/pom:source" 1.8
%pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/pom:target" 1.8
%{mvn_file} :{*} @1
%{mvn_package} :*-common %{name}
%build
%{mvn_build} -s -f -- -Dsource=8
%install
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
%files common -f .mfiles-%{name}
%license LICENSE.txt NOTICE.txt
%files client -f .mfiles-%{name}-client
%files server -f .mfiles-%{name}-server
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt NOTICE.txt
%changelog