File xml-security13.spec of Package xml-security13

#
# spec file
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2000-2009, JPackage Project
#
# 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/
#


%global oname xmlsec
%global compat 13
%global project_name xml-security
Name:           %{project_name}%{compat}
Version:        1.3.0
Release:        0
Summary:        Implementation of W3C security standards for XML
License:        Apache-2.0
URL:            https://santuario.apache.org/
Source0:        %{project_name}-%{version}.tar.xz
Patch0:         %{name}-build.patch
BuildRequires:  ant
BuildRequires:  apache-commons-logging
BuildRequires:  fdupes
BuildRequires:  java-devel >= 1.8
BuildRequires:  javapackages-local
BuildRequires:  xalan-j2
BuildRequires:  xerces-j2
BuildRequires:  xml-apis
BuildArch:      noarch

%description
The XML Security project is aimed at providing implementation
of security standards for XML. Currently the focus is on the
W3C standards :
- XML-Signature Syntax and Processing; and
- XML Encryption Syntax and Processing.

%package javadoc
Summary:        Javadoc for %{name}

%description javadoc
Javadoc for %{name}.

%prep
%setup -q -n %{project_name}-%{version}
%patch -P 0 -p1

%build
%{ant} \
	-Dant.build.javac.target=8 -Dant.build.javac.source=8 \
	-Dlib.logging=$(find-jar commons-logging) \
	-Dlib.xalan.1=$(find-jar xalan-j2) \
	-Dlib.xalan.2=$(find-jar xalan-j2-serializer) \
	-Dlib.xalan.3=$(find-jar xml-apis) \
	-Dlib.xerces.1=$(find-jar xerces-j2) \
	jar javadoc

%install
# jar
install -d -m 755 %{buildroot}%{_javadir}
install -pm 644 build/%{oname}-%{version}.jar %{buildroot}%{_javadir}/%{oname}%{compat}.jar

%add_maven_depmap %{project_name}:%{oname}:%{version} %{oname}%{compat}.jar

#javadoc
mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -a build/docs/html/javadoc/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}/%{name}

%files -f .mfiles
%license LICENSE NOTICE

%files javadoc
%{_javadocdir}/%{name}
%license LICENSE NOTICE

%changelog
openSUSE Build Service is sponsored by