File openpdf.spec of Package openpdf

#
# spec file for package openpdf
#
# Copyright (c) 2024 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:           openpdf
Version:        1.4.2
Release:        0
Summary:        A free Java library for creating and editing PDF files
License:        LGPL-2.1-only AND MPL-2.0
Group:          Development/Libraries/Java
URL:            https://github.com/LibrePDF/OpenPDF
Source:         %{url}/archive/refs/tags/%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  maven-local
BuildRequires:  mvn(com.google.code.findbugs:jsr305)
BuildRequires:  mvn(com.ibm.icu:icu4j)
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires:  mvn(org.apache.xmlgraphics:fop)
BuildRequires:  mvn(org.bouncycastle:bcpkix-jdk18on)
BuildRequires:  mvn(org.bouncycastle:bcprov-jdk18on)
BuildRequires:  mvn(org.dom4j:dom4j)
BuildRequires:  mvn(org.jfree:jcommon)
BuildRequires:  mvn(org.jfree:jfreechart)
BuildRequires:  mvn(org.swinglabs:pdf-renderer)
BuildArch:      noarch

%description
OpenPDF is a Java library for creating and editing PDF files. OpenPDF is based
on a fork of iText.

%package javadoc
Summary:        API documentation for %{name}
Group:          Documentation/HTML

%description javadoc
API documentation for %{name}.

%prep
%setup -q -n OpenPDF-%{version}

%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin
%pom_remove_plugin org.jacoco:jacoco-maven-plugin

%build
%{mvn_build} -f -- -DlegacyMode=true -Dverbose=true

%install
%mvn_install
%fdupes %{buildroot}%{_javadocdir}/%{name}

%files -f .mfiles
%license LICENSE.md %{name}/src/main/resources/META-INF/{MPL-2.0.txt,LGPL-2.1.md}
%doc {README,CONTRIBUTING}.md

%files javadoc -f .mfiles-javadoc
%license LICENSE.md %{name}/src/main/resources/META-INF/{MPL-2.0.txt,LGPL-2.1.md}

%changelog
openSUSE Build Service is sponsored by