diff --git a/apache-pdfbox.spec b/apache-pdfbox.spec index e255e80..489f2c7 100644 --- a/apache-pdfbox.spec +++ b/apache-pdfbox.spec @@ -1,7 +1,7 @@ # # spec file for package apache-pdfbox # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,39 +12,31 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# 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: 1.8.16 +Version: 2.0.19 Release: 0 Summary: Java PDF Library License: Apache-2.0 Group: Development/Libraries/Java -Url: https://pdfbox.apache.org/ -Source0: http://www-us.apache.org/dist/pdfbox/%{version}/pdfbox-%{version}-src.zip -Source1: http://central.maven.org/maven2/org/apache/pdfbox/pdfbox/%{version}/pdfbox-%{version}.pom -Source2: http://central.maven.org/maven2/org/apache/pdfbox/fontbox/%{version}/fontbox-%{version}.pom -Source3: http://central.maven.org/maven2/org/apache/pdfbox/jempbox/%{version}/jempbox-%{version}.pom -Patch0: pdfbox-1.8.12-bouncycastle.patch -Patch1: disable-downloads.patch -Patch2: fix-javadoc-dep.patch -Patch3: pdfbox-1.8.12-sourcetarget.patch -Patch4: fix-version.patch +URL: https://pdfbox.apache.org/ +Source0: http://archive.apache.org/dist/pdfbox/%{version}/pdfbox-%{version}-src.zip +Source1: pdfbox-%{version}-build.tar.xz BuildRequires: ant BuildRequires: apache-commons-logging BuildRequires: bouncycastle +BuildRequires: bouncycastle-mail +BuildRequires: bouncycastle-pkix BuildRequires: fdupes -BuildRequires: icu4j BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-local BuildRequires: javapackages-tools -BuildRequires: junit BuildRequires: unzip Requires: apache-commons-logging -Requires: icu4j BuildArch: noarch %description @@ -62,52 +54,38 @@ Requires: %{name} = %{version}-%{release} JavaDoc documentation for %{name} %prep -%setup -q -n pdfbox-%{version} -%autopatch -p1 +%setup -q -n pdfbox-%{version} -a1 +%pom_change_dep :junit :::test fontbox %build -# Build -ant -buildfile pdfbox/build.xml \ - -Dbcprov.jar=$(build-classpath bcprov) -Djunit.jar=$(build-classpath junit4) \ - -Dicu4j.jar=$(build-classpath icu4j) -Dlogging.jar=$(build-classpath commons-logging) \ - -Dbuild.sysclasspath=first -Dcompile.source=8 -Dcompile.target=8 \ - fontbox.package jempbox.package javadoc +mkdir -p lib +build-jar-repository -s lib bcmail bcpkix bcprov commons-logging +ant -Dtest.skip=true package javadoc %install # Code -install -d %{buildroot}%{_javadir} -for jar in fontbox jempbox; do - install -p -m644 ${jar}/target/${jar}-%{version}.jar %{buildroot}%{_javadir}/${jar}.jar +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 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 "org.apache.pdfbox%{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}/ -install -d -m 0755 %{buildroot}/%{_mavenpomdir}/ -install -m 0644 %{SOURCE2} %{buildroot}/%{_mavenpomdir}/JPP-fontbox.pom -install -m 0644 %{SOURCE3} %{buildroot}/%{_mavenpomdir}/JPP-jempbox.pom - -%add_maven_depmap JPP-fontbox.pom fontbox.jar -%add_maven_depmap JPP-jempbox.pom jempbox.jar - -# JavaDoc -install -dm 755 %{buildroot}%{_javadocdir}/%{name}-%{version} -cp -pr pdfbox/target/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version} -%fdupes %{buildroot}%{_javadocdir}/%{name}-%{version} -ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} +%fdupes -s %{buildroot}%{_javadocdir} %files javadoc -%{_javadocdir}/%{name}-%{version} %{_javadocdir}/%{name} -%files -%doc RELEASE-NOTES.txt NOTICE.txt README.txt -%license LICENSE.txt +%files -f .mfiles +%doc RELEASE-NOTES.txt README.md +%license LICENSE.txt NOTICE.txt %{_javadir}/fontbox.jar -%{_javadir}/jempbox.jar -%{_mavenpomdir}/JPP-fontbox.pom -%{_mavenpomdir}/JPP-jempbox.pom -%if %{defined _maven_repository} -%{_mavendepmapfragdir}/%{name} -%else -%{_datadir}/maven-metadata/%{name}.xml* -%endif %changelog diff --git a/disable-downloads.patch b/disable-downloads.patch deleted file mode 100644 index 129ed6f..0000000 --- a/disable-downloads.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- - pdfbox/build.xml | 36 ------------------------------------ - 1 file changed, 36 deletions(-) - -Index: pdfbox-1.8.11/pdfbox/build.xml -=================================================================== ---- pdfbox-1.8.11.orig/pdfbox/build.xml -+++ pdfbox-1.8.11/pdfbox/build.xml -@@ -342,48 +342,12 @@ - - - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - - - -- -- -- -- -- -- -- -- - - - -- -- -- -- -- -- -- -- - - - diff --git a/fix-javadoc-dep.patch b/fix-javadoc-dep.patch deleted file mode 100644 index d541a0b..0000000 --- a/fix-javadoc-dep.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - pdfbox/build.xml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: pdfbox-1.8.11/pdfbox/build.xml -=================================================================== ---- pdfbox-1.8.11.orig/pdfbox/build.xml -+++ pdfbox-1.8.11/pdfbox/build.xml -@@ -834,7 +834,7 @@ - - - -- -+ - - - -- -+ - - - diff --git a/fontbox-1.8.16.pom b/fontbox-1.8.16.pom deleted file mode 100644 index c7eca9d..0000000 --- a/fontbox-1.8.16.pom +++ /dev/null @@ -1,65 +0,0 @@ - - - - 4.0.0 - - - org.apache.pdfbox - pdfbox-parent - 1.8.16 - ../parent/pom.xml - - - fontbox - bundle - - Apache FontBox - - The Apache FontBox library is an open source Java tool to obtain low level information - from font files. FontBox is a subproject of Apache PDFBox. - - - 2008 - http://pdfbox.apache.org/ - - - - commons-logging - commons-logging - 1.1.1 - - - junit - junit - 4.8.1 - test - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - - - diff --git a/jempbox-1.8.16.pom b/jempbox-1.8.16.pom deleted file mode 100644 index 8be8729..0000000 --- a/jempbox-1.8.16.pom +++ /dev/null @@ -1,58 +0,0 @@ - - - - 4.0.0 - - - org.apache.pdfbox - pdfbox-parent - 1.8.16 - ../parent/pom.xml - - - jempbox - bundle - - Apache JempBox - - The Apache JempBox library is an open source Java tool that implements Adobe's XMP(TM) - specification. JempBox is a subproject of Apache PDFBox. - - 2008 - - - - junit - junit - 4.8.1 - test - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - - - diff --git a/pdfbox-1.8.12-bouncycastle.patch b/pdfbox-1.8.12-bouncycastle.patch deleted file mode 100644 index 3837c50..0000000 --- a/pdfbox-1.8.12-bouncycastle.patch +++ /dev/null @@ -1,50 +0,0 @@ -Index: pdfbox-1.8.15/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java -=================================================================== ---- pdfbox-1.8.15.orig/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java -+++ pdfbox-1.8.15/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/PublicKeySecurityHandler.java -@@ -38,7 +38,7 @@ import org.apache.commons.logging.Log; - import org.apache.commons.logging.LogFactory; - - import org.bouncycastle.asn1.ASN1InputStream; --import org.bouncycastle.asn1.DERObject; -+import org.bouncycastle.asn1.ASN1Primitive; - import org.bouncycastle.asn1.DERObjectIdentifier; - import org.bouncycastle.asn1.DEROctetString; - import org.bouncycastle.asn1.DEROutputStream; -@@ -53,9 +53,6 @@ import org.bouncycastle.asn1.cms.Recipie - import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers; - import org.bouncycastle.asn1.x509.AlgorithmIdentifier; - import org.bouncycastle.asn1.x509.TBSCertificateStructure; --import org.bouncycastle.cms.CMSEnvelopedData; --import org.bouncycastle.cms.CMSException; --import org.bouncycastle.cms.RecipientInformation; - import org.apache.pdfbox.cos.COSArray; - import org.apache.pdfbox.cos.COSString; - import org.apache.pdfbox.exceptions.CryptographyException; -@@ -311,7 +308,7 @@ public class PublicKeySecurityHandler ex - pkcs7input[22] = two; - pkcs7input[23] = one; - -- DERObject obj = createDERForRecipient(pkcs7input, certificate); -+ ASN1Primitive obj = createDERForRecipient(pkcs7input, certificate); - - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - -@@ -378,7 +375,7 @@ public class PublicKeySecurityHandler ex - - } - -- private DERObject createDERForRecipient(byte[] in, X509Certificate cert) -+ private ASN1Primitive createDERForRecipient(byte[] in, X509Certificate cert) - throws IOException, - GeneralSecurityException - { -@@ -389,7 +386,7 @@ public class PublicKeySecurityHandler ex - AlgorithmParameters algorithmparameters = algorithmparametergenerator.generateParameters(); - ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(algorithmparameters.getEncoded("ASN.1")); - ASN1InputStream asn1inputstream = new ASN1InputStream(bytearrayinputstream); -- DERObject derobject = asn1inputstream.readObject(); -+ ASN1Primitive derobject = asn1inputstream.readObject(); - KeyGenerator keygenerator; - try - { diff --git a/pdfbox-1.8.12-sourcetarget.patch b/pdfbox-1.8.12-sourcetarget.patch deleted file mode 100644 index 5ac8af1..0000000 --- a/pdfbox-1.8.12-sourcetarget.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- pdfbox-1.8.12/pdfbox/build.xml 2017-09-15 07:55:42.584501156 +0200 -+++ pdfbox-1.8.12/pdfbox/build.xml 2017-09-15 08:46:31.257902337 +0200 -@@ -23,6 +23,9 @@ - - - -+ -+ -+ - - - -@@ -175,10 +178,10 @@ - description="Compile Java source files"> - - - - - -@@ -186,10 +189,10 @@ - description="Compile Java source files"> - - - - - -@@ -197,10 +200,10 @@ - description="Compile Java source files"> - - - - - -@@ -809,6 +812,7 @@ - doctitle="${project.name}" - verbose="no" - classpathref="pdfbox.build.classpath" -+ source="${compile.source}" - encoding="ISO-8859-1" - breakiterator="yes"> - diff --git a/pdfbox-1.8.16-src.zip b/pdfbox-1.8.16-src.zip deleted file mode 100644 index 6b86ab9..0000000 --- a/pdfbox-1.8.16-src.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bde318e1d53fedd4cea6d693e3402595e7fa5229204d00f2f6b7fd2f959f7b9b -size 11079295 diff --git a/pdfbox-1.8.16.pom b/pdfbox-1.8.16.pom deleted file mode 100644 index d0688e2..0000000 --- a/pdfbox-1.8.16.pom +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - 4.0.0 - - - org.apache.pdfbox - pdfbox-parent - 1.8.16 - ../parent/pom.xml - - - pdfbox - bundle - - Apache PDFBox - - The Apache PDFBox library is an open source Java tool for working with PDF documents. - - 2002 - - - - org.apache.pdfbox - fontbox - ${project.version} - - - org.apache.pdfbox - jempbox - ${project.version} - - - commons-logging - commons-logging - 1.1.1 - - - org.bouncycastle - bcmail-jdk15 - 1.44 - true - - - org.bouncycastle - bcprov-jdk15 - 1.44 - true - - - com.ibm.icu - icu4j - 3.8 - true - - - junit - junit - 4.8.1 - test - - - - - com.levigo.jbig2 - levigo-jbig2-imageio - 1.6.5 - test - - - com.github.jai-imageio - jai-imageio-core - 1.3.1 - test - - - com.github.jai-imageio - jai-imageio-jpeg2000 - 1.3.0 - test - - - - - - - src/main/resources - true - - - - - maven-antrun-plugin - - - generate-resources - - - - - - - run - - - - - - org.apache.ant - ant-nodeps - 1.8.1 - - - - - maven-surefire-plugin - - -Xmx128m -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider - - org/apache/pdfbox/TestAll.java - org/apache/pdfbox/util/TestImageIOUtils.java - org/apache/pdfbox/util/TestTextStripper.java - - - - src/test/resources/logging.properties - - - - - org.apache.felix - maven-bundle-plugin - true - - - - {maven-resources}, - META-INF=target/maven-shared-archive-resources/META-INF, - org/apache/pdfbox/resources=target/classes/org/apache/pdfbox/resources - - - - - - org.apache.rat - apache-rat-plugin - - - src/main/resources/org/apache/pdfbox/resources/cmap/* - src/main/resources/META-INF/services/* - src/test/resources/input/rendering/*.ai - src/test/resources/input/*.txt - src/test/resources/org/apache/pdfbox/filter/*.bin - src/test/resources/org/apache/pdfbox/encryption/*.der - src/test/resources/org/apache/pdfbox/encryption/*.pfx - src/test/resources/org/apache/pdfbox/pdmodel/sRGB.* - download/glyphlist.txt - release.properties - - - - - - - - diff --git a/pdfbox-2.0.19-build.tar.xz b/pdfbox-2.0.19-build.tar.xz new file mode 100644 index 0000000..0acce03 --- /dev/null +++ b/pdfbox-2.0.19-build.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6914dc8c26228507457c71b044994d25d0f04c7385771ee0ba1a735415033ed +size 7064 diff --git a/pdfbox-2.0.19-src.zip b/pdfbox-2.0.19-src.zip new file mode 100644 index 0000000..035141f --- /dev/null +++ b/pdfbox-2.0.19-src.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae8ff375939f1209d4c3b21a933404d312acceb68b04a5435f0bc47bc72a0e32 +size 15360412