commit 82fd9e63a65dd075bcd49da4d6616a91cbd8d689c40421be04a1ec11b9db8830 Author: Tomáš Chvátal Date: Mon Mar 7 18:34:46 2016 +0000 Accepting request 367539 from home:favogt:branches:Java:packages 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. Only fontbox and jempbox are built as pdfbox itself depends on Adobe's pcif. OBS-URL: https://build.opensuse.org/request/show/367539 OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-pdfbox?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/apache-pdfbox.changes b/apache-pdfbox.changes new file mode 100644 index 0000000..7bfa4c0 --- /dev/null +++ b/apache-pdfbox.changes @@ -0,0 +1,17 @@ +------------------------------------------------------------------- +Mon Mar 7 12:32:36 UTC 2016 - fvogt@suse.com + +- Drop junit and javapackages-tools Requires + +------------------------------------------------------------------- +Mon Mar 7 09:11:36 UTC 2016 - fvogt@suse.com + +- Enable javadoc building and packaging + +------------------------------------------------------------------- +Thu Mar 3 10:24:32 UTC 2016 - fvogt@suse.com + +- Initial package +- Only fontbox and jempbox are built + + diff --git a/apache-pdfbox.spec b/apache-pdfbox.spec new file mode 100644 index 0000000..596c670 --- /dev/null +++ b/apache-pdfbox.spec @@ -0,0 +1,112 @@ +# +# spec file for package apache-pdfbox +# +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# +# 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 http://bugs.opensuse.org/ +# + + +# Only fontbox and jempbox are built as pdfbox itself depends on Adobe's pcif. + +Name: apache-pdfbox +Version: 1.8.11 +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 +BuildRequires: ant +BuildRequires: apache-commons-logging +BuildRequires: icu4j +BuildRequires: java-devel >= 1.5 +BuildRequires: javapackages-tools +BuildRequires: junit +BuildRequires: unzip +Requires: apache-commons-logging +Requires: icu4j +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +Patch1: disable-downloads.patch +Patch2: fix-javadoc-dep.patch + +%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} +%patch1 -p1 +%patch2 -p1 + +%build +# Link dependencies +mkdir -p pdfbox/external +DEPS="junit4 icu4j commons-logging" +build-jar-repository -s -p pdfbox/external $DEPS +# build.xml uses hardcoded version numbers, so it doesn't find the jars... +for dep in $DEPS; do + CLASSPATH="$PWD/pdfbox/external/${dep}.jar:$CLASSPATH" +done +export CLASSPATH + +# Build +ant -buildfile pdfbox/build.xml -Dbuild.sysclasspath=first fontbox.package jempbox.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 +done + +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} +ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} + +%files javadoc +%defattr(0644,root,root,0755) +%{_javadocdir}/%{name}-%{version} +%{_javadocdir}/%{name} + +%files +%defattr(-,root,root,-) +%doc RELEASE-NOTES.txt LICENSE.txt NOTICE.txt README.txt +%{_javadir}/fontbox.jar +%{_javadir}/jempbox.jar +%{_mavenpomdir}/JPP-fontbox.pom +%{_mavenpomdir}/JPP-jempbox.pom +%{_datadir}/maven-metadata/%{name}.xml + +%changelog diff --git a/disable-downloads.patch b/disable-downloads.patch new file mode 100644 index 0000000..129ed6f --- /dev/null +++ b/disable-downloads.patch @@ -0,0 +1,57 @@ +--- + 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 new file mode 100644 index 0000000..d541a0b --- /dev/null +++ b/fix-javadoc-dep.patch @@ -0,0 +1,17 @@ +--- + 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 @@ + + + +- ++ + + + + 4.0.0 + + + org.apache.pdfbox + pdfbox-parent + 1.8.11 + ../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.11.pom b/jempbox-1.8.11.pom new file mode 100644 index 0000000..8fcc0b3 --- /dev/null +++ b/jempbox-1.8.11.pom @@ -0,0 +1,58 @@ + + + + 4.0.0 + + + org.apache.pdfbox + pdfbox-parent + 1.8.11 + ../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.11-src.zip b/pdfbox-1.8.11-src.zip new file mode 100644 index 0000000..d5af92a --- /dev/null +++ b/pdfbox-1.8.11-src.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:160a2d058325845234eaa6b5ae23535b9226aadb4e570a1a76f7106a00653b1b +size 11026359 diff --git a/pdfbox-1.8.11.pom b/pdfbox-1.8.11.pom new file mode 100644 index 0000000..9e7e9c9 --- /dev/null +++ b/pdfbox-1.8.11.pom @@ -0,0 +1,190 @@ + + + + + + 4.0.0 + + + org.apache.pdfbox + pdfbox-parent + 1.8.11 + ../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.2 + test + + + net.java.dev.jai-imageio + jai-imageio-core-standalone + 1.2-pre-dr-b04-2011-07-04 + test + + + + + + jbig2.googlecode + JBIG2 ImageIO-Plugin repository at googlecode.com + https://jbig2-imageio.googlecode.com/svn/maven-repository/ + + + mygrid-repository + myGrid Repository + http://www.mygrid.org.uk/maven/repository + + + + + + + src/main/resources + true + + + + + maven-antrun-plugin + + + generate-resources + + + + + + + run + + + + + + org.apache.ant + ant-nodeps + 1.8.1 + + + + + maven-surefire-plugin + + -Xmx128m + + 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 + download/glyphlist.txt + release.properties + + + + + + + +