File apache-pdfbox3.spec of Package apache-pdfbox3

#
# spec file for package apache-pdfbox3
#
# Copyright (c) 2025 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/
#


%global short_name pdfbox
%global compat_version 3
Name:           apache-%{short_name}%{compat_version}
Version:        3.0.3
Release:        0
Summary:        A Java PDF Library
License:        Apache-2.0
Group:          Development/Libraries/Java
URL:            http://pdfbox.apache.org/
Source0:        https://github.com/apache/pdfbox/archive/refs/tags/%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  maven-local
BuildRequires:  mvn(info.picocli:picocli)
BuildRequires:  mvn(org.apache.ant:ant)
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires:  mvn(org.apache.lucene:lucene-analyzers-common)
BuildRequires:  mvn(org.apache.lucene:lucene-core)
BuildRequires:  mvn(org.apache.pdfbox:jbig2-imageio)
BuildRequires:  mvn(org.apache:apache:pom:)
BuildRequires:  mvn(org.bouncycastle:bcpkix-jdk18on)
BuildRequires:  mvn(org.bouncycastle:bcprov-jdk18on)
BuildArch:      noarch

%description
The Apache PDFBox® library is an open source Java tool for working with PDF
documents. This project allows creation of new PDF documents, manipulation of
existing documents and the ability to extract content from documents. Apache
PDFBox also includes several command-line utilities. Apache PDFBox is published
under the Apache License v2.0.


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

%description javadoc
API documentation for %{name}.

%prep
%autosetup -n %{short_name}-%{version}

sed -i -e '/META-INF=target\/maven-shared-archive-resources\/META-INF/d' \
	pdfbox/pom.xml

%pom_remove_plugin -r org.codehaus.mojo:animal-sniffer-maven-plugin
%pom_remove_plugin -r com.googlecode.maven-download-plugin:download-maven-plugin

%{mvn_compat_version} : %{compat_version} %{version}

%build
%{mvn_build} -f -- \
	-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
	-Dmaven.compiler.{source,target}=9

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

%files -f .mfiles
%license {NOTICE,LICENSE}.txt
%doc RELEASE-NOTES.txt README.md

%files javadoc -f .mfiles-javadoc
%license {NOTICE,LICENSE}.txt

%changelog
openSUSE Build Service is sponsored by