Name: pdfbox1 Version: 1.8.12 Release: 2%{?dist} Summary: Java library for working with PDF documents # BSD-3-Clause Adobe cmap resources License: ASL 2.0 and BSD URL: http://pdfbox.apache.org/ Source0: http://www.apache.org/dist/pdfbox/%{version}/pdfbox-%{version}-src.zip # Don't download anything Patch0: pdfbox-nodownload.patch # Use system bitream-vera-sans-fonts instead of bundled fonts Patch1: pdfbox-1.2.0-bitstream.patch Patch2: pdfbox-1.8.12-port-to-bouncycastle1.54.patch # Skip testImageIOUtils https://issues.apache.org/jira/browse/PDFBOX-2084 Patch3: pdfbox-1.8.12-testImageIOUtils.patch # https://java.net/jira/browse/JAVACC-292 thanks to Michael Simacek Patch4: pdfbox-1.8.12-javacc6.patch # https://issues.apache.org/jira/browse/PDFBOX-3571 Patch5: pdfbox-1.8.12-use-system-icc-profiles-openicc.patch # Fix test and remove unavailable ArialMT.ttf referencies Patch6: pdfbox-1.8.12-examples-use-system-bitstream-vera-sans-fonts.patch BuildRequires: bitstream-vera-sans-fonts BuildRequires: fontconfig BuildRequires: icc-profiles-openicc BuildRequires: maven-local BuildRequires: mvn(com.adobe.pdf:pcfi) BuildRequires: mvn(com.ibm.icu:icu4j) BuildRequires: mvn(commons-logging:commons-logging) BuildRequires: mvn(junit:junit) BuildRequires: mvn(log4j:log4j:1.2.17) BuildRequires: mvn(org.apache.ant:ant) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-release-plugin) BuildRequires: mvn(org.apache.rat:apache-rat-plugin) BuildRequires: mvn(org.bouncycastle:bcmail-jdk15on) BuildRequires: mvn(org.codehaus.mojo:javacc-maven-plugin) Requires: bitstream-vera-sans-fonts Requires: icc-profiles-openicc Requires: java >= 1:1.6.0 # ./pdfbox/src/main/resources/org/apache/pdfbox/resources/cmap/* # With multiple versions Provides: bundled(adobe-cmap-resources) BuildArch: noarch %description Apache PDFBox is an open source Java PDF library 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: Javadoc for %{name} %description javadoc This package contains the API documentation for %{name}. %prep %setup -q -n pdfbox-%{version} # Cleanup find -name '*.class' -delete find -name '*.jar' -delete find -name '*.icc' -print -delete find -name '*.icm' -print -delete %patch0 -p1 -b .nodownload %patch1 -p1 -b .bitstream # Remove included fonts rm -r pdfbox/src/main/resources/org/apache/pdfbox/resources/ttf %patch2 -p1 -b .bouncycastle1.54 # Use jdk15on version of bcprov %pom_change_dep -r :bcmail-jdk15 :bcmail-jdk15on:1.54 %pom_change_dep -r :bcprov-jdk15 :bcprov-jdk15on:1.54 %pom_add_dep org.bouncycastle:bcpkix-jdk15on:1.54 pdfbox %patch3 -p1 -b .testImageIOUtils rm -f pdfbox/src/test/java/org/apache/pdfbox/util/TestImageIOUtils.java %patch4 -p1 -b .javacc %patch5 -p1 -b .icc-profiles rm -r examples/src/main/resources/org/apache/pdfbox/resources/pdfa rm pdfbox/src/test/resources/org/apache/pdfbox/pdmodel/*Profile.icm* %patch6 -p1 -b .bitstream-vera-sans-fonts %pom_disable_module war # Disable lucene, not compatible with lucene 3.6 %pom_disable_module lucene # Don't build app (it's just a bundle of everything) %pom_disable_module preflight-app %pom_disable_module app %pom_remove_plugin -r :animal-sniffer-maven-plugin %pom_remove_plugin -r :maven-deploy-plugin # cobertura-maven-plugin has been retired %pom_remove_plugin :cobertura-maven-plugin preflight %pom_remove_dep javax.activation:activation preflight %pom_change_dep -r :ant-nodeps :ant %pom_change_dep -r :log4j ::1.2.17 # Remove META-INF file that does not exist sed -i -e '/META-INF/d' pdfbox/pom.xml # com.googlecode.maven-download-plugin:download-maven-plugin:1.2.1 used for get # test resources: http://www.pdfa.org/wp-content/uploads/2011/08/isartor-pdfa-2008-08-13.zip %pom_remove_plugin :download-maven-plugin preflight # Disable filtering sed -i -e /filtering/d examples/pom.xml # Use old bouncycastle release rm examples/src/main/java/org/apache/pdfbox/examples/signature/CreateSignature.java \ examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature.java # IllegalArgumentException: Parameter 'directory' is not a directory rm preflight/src/test/java/org/apache/pdfbox/preflight/integration/TestValidFiles.java # Remove unpackaged deps for the above tests %pom_remove_dep net.java.dev.jai-imageio:jai-imageio-core-standalone pdfbox # https://bugzilla.redhat.com/show_bug.cgi?id=1094417 %pom_remove_dep com.levigo.jbig2:levigo-jbig2-imageio pdfbox rm pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/xobject/PDJpegTest.java \ pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/xobject/PDCcittTest.java sed -i -e /PDJpegTest/d pdfbox/src/test/java/org/apache/pdfbox/TestAll.java sed -i -e /PDCcittTest/d pdfbox/src/test/java/org/apache/pdfbox/TestAll.java # ComparisonFailure: expected:... but was:... rm preflight/src/test/java/org/apache/pdfbox/preflight/metadata/TestSynchronizedMetadataValidation.java cp -p fontbox/README.txt fontbox-README.txt cp -p jempbox/README.txt jempbox-README.txt cp -p preflight/README.txt preflight-README.txt cp -p xmpbox/README.txt xmpbox-README.txt # Fix line endings sed -i -e 's|\r||' RELEASE-NOTES.txt *README.txt %mvn_compat_version : %{version} 1.8 1 %build %mvn_build -- -Dadobefiles.jar=$(build-classpath pcfi) %install %mvn_install %files -f .mfiles %doc *README.txt RELEASE-NOTES.txt %license LICENSE.txt NOTICE.txt %files javadoc -f .mfiles-javadoc %license LICENSE.txt NOTICE.txt %changelog * Sun Jan 01 2017 gil cattaneo 1.8.12-2 - review fixes: bundle resources and wrong line endings encoding * Tue Oct 18 2016 gil cattaneo 1.8.12-1 - Initial rpm