apache-pdfbox/apache-pdfbox.spec
Fridrich Strba 4291e01bde Accepting request 1102890 from home:urbic:branches:Java:packages
- Update to 2.0.29
  * Bug
    - A (rotated) barcode is missing from a pdf when printed
    - NullPointerException in PDTrueTypeFont.java getPath( )
    - Parsing of XMP metadata without optional xmpmeta element
    - Avoid division by 0 in shading function interpolation
    - MyPageDrawer#getPaint may produce
      UnsupportedOperationException
    - Barcode corrupted when printing document
    - The text in some fonts is lost when converting pdf to image
    - PDFTextStripper runs out of memory in 2.0.28 but not in
      2.0.27 same code
    - all values in the signature dictionary shall be direct
      objects
    - Glyphs not rendered
    - PDF with mangled font rendering in some environments
    - RadioButtons disappear when printing PDF
    - BitsPerComponent 16 not allowed in PDF/A-1b
    - NullPointerException in PDFStreamEngine.showText
    - Infinte loop when parsing Type1 font
  * Improvement
    - Add duplex and tray parameters to PrintPDF
    - Create command line utility to extract XMP data
    - Improve Opaque PDFRenderer example
  * Task
    - Implement /RunLengthDecode encoder
    - Slight regression on corrupt bug tracker file
    - move and update bc from jdk15on to jdk15to18
- Build and package forgotten artifact org.apache.pdfbox:xmpbox
- Add build dependency on mvn(javax.xml.bind:jaxb-api), needed for
  xmpbox.

OBS-URL: https://build.opensuse.org/request/show/1102890
OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-pdfbox?expand=0&rev=40
2023-08-08 12:44:58 +00:00

101 lines
3.5 KiB
RPMSpec

#
# spec file for package apache-pdfbox
#
# Copyright (c) 2023 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/
#
# Only fontbox and jempbox are built as pdfbox itself depends on Adobe's pcif.
Name: apache-pdfbox
Version: 2.0.29
Release: 0
Summary: Java PDF Library
License: Apache-2.0 AND OFL-1.1
Group: Development/Libraries/Java
URL: https://pdfbox.apache.org/
Source0: https://archive.apache.org/dist/pdfbox/%{version}/pdfbox-%{version}-src.zip
Source1: https://archive.apache.org/dist/pdfbox/%{version}/pdfbox-%{version}-src.zip.asc
Source2: pdfbox-%{version}-build.tar.xz
Source3: https://www.apache.org/dist/pdfbox/KEYS#/pdfbox.keyring
BuildRequires: ant
BuildRequires: apache-commons-logging
BuildRequires: bouncycastle
BuildRequires: bouncycastle-mail
BuildRequires: bouncycastle-pkix
BuildRequires: bouncycastle-util
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: unzip
BuildRequires: mvn(javax.xml.bind:jaxb-api)
Requires: apache-commons-logging
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.
%package javadoc
Summary: API Documentation for PDFBox
Group: Documentation/HTML
Requires: %{name} = %{version}-%{release}
%description javadoc
JavaDoc documentation for %{name}
%prep
%setup -q -n pdfbox-%{version} -a2
# Remove provided binaries
find -name '*.class' -delete
find -name '*.jar' -delete
%pom_change_dep :junit :::test fontbox
%build
mkdir -p lib
build-jar-repository -s lib bcmail bcpkix bcprov bcutil commons-logging glassfish-jaxb-api
%{ant} -Dproject.version=%{version} -Dtest.skip=true package javadoc
%install
# Code
install -d -m 0755 %{buildroot}%{_javadir}/pdfbox
install -d -m 0755 %{buildroot}%{_mavenpomdir}/pdfbox
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
for jar in fontbox pdfbox xmpbox debugger tools; do
install -p -m 0644 ${jar}/target/*-%{version}.jar %{buildroot}%{_javadir}/pdfbox/${jar}.jar
%pom_remove_parent ${jar}
%pom_xpath_inject pom:project "<groupId>org.apache.pdfbox</groupId><version>%{version}</version>" ${jar}
install -p -m 0644 ${jar}/pom.xml %{buildroot}%{_mavenpomdir}/pdfbox/${jar}.pom
%add_maven_depmap pdfbox/${jar}.pom pdfbox/${jar}.jar
cp -pr ${jar}/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/${jar}
done
# Compatibility link
ln -s -f %{_javadir}/pdfbox/fontbox.jar %{buildroot}%{_javadir}/
%fdupes -s %{buildroot}%{_javadocdir}
%files javadoc
%{_javadocdir}/%{name}
%files -f .mfiles
%doc RELEASE-NOTES.txt README.md
%license LICENSE.txt NOTICE.txt
%{_javadir}/fontbox.jar
%changelog