[pdfbox] Initial import

Orion Poplawski orion at fedoraproject.org
Fri Dec 16 20:26:13 UTC 2011


commit 48201fb47e10327a159416cc445176b499a4846e
Author: Orion Poplawski <orion at cora.nwra.com>
Date:   Fri Dec 16 13:26:13 2011 -0700

    Initial import

 .gitignore                   |    1 +
 pdfbox-1.2.0-bitstream.patch |   14 +++
 pdfbox-nodownload.patch      |   14 +++
 pdfbox.spec                  |  253 ++++++++++++++++++++++++++++++++++++++++++
 sources                      |    1 +
 5 files changed, 283 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..a23e310 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pdfbox-1.6.0-src.zip
diff --git a/pdfbox-1.2.0-bitstream.patch b/pdfbox-1.2.0-bitstream.patch
new file mode 100644
index 0000000..30680ac
--- /dev/null
+++ b/pdfbox-1.2.0-bitstream.patch
@@ -0,0 +1,14 @@
+--- pdfbox-1.2.0/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFBox_External_Fonts.properties.bitstream	2010-06-24 20:34:40.000000000 -0600
++++ pdfbox-1.2.0/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFBox_External_Fonts.properties	2010-07-07 10:22:47.367942753 -0600
+@@ -13,7 +13,7 @@
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ #
+-Arial-BoldItalicMT=org/apache/pdfbox/resources/ttf/Arial-BoldItalicMT.ttf
+-Arial-BoldMT=org/apache/pdfbox/resources/ttf/Arial-BoldMT.ttf
+-ArialMT=org/apache/pdfbox/resources/ttf/ArialMT.ttf
+-UNKNOWN_FONT=org/apache/pdfbox/resources/ttf/ArialMT.ttf
++Arial-BoldItalicMT=/usr/share/fonts/bitstream-vera/VeraBI.ttf
++Arial-BoldMT=/usr/share/fonts/bitstream-vera/VeraBd.ttf
++ArialMT=/usr/share/fonts/bitstream-vera/Vera.ttf
++UNKNOWN_FONT=/usr/share/fonts/bitstream-vera/Vera.ttf
diff --git a/pdfbox-nodownload.patch b/pdfbox-nodownload.patch
new file mode 100644
index 0000000..3efd979
--- /dev/null
+++ b/pdfbox-nodownload.patch
@@ -0,0 +1,14 @@
+diff -up pdfbox-1.6.0/pdfbox/build.xml.nodownload pdfbox-1.6.0/pdfbox/build.xml
+--- pdfbox-1.6.0/pdfbox/build.xml.nodownload	2011-06-28 20:35:30.000000000 -0600
++++ pdfbox-1.6.0/pdfbox/build.xml	2011-08-10 12:00:41.099824956 -0600
+@@ -223,10 +223,6 @@
+     <target name="get.adobefiles"
+             unless="adobefiles.found" depends="find.adobefiles"
+             description="Download and unpack afm and cmap files from Adobe">
+-        <antcall target="downloadfile">
+-            <param name="sourcefile" value="${adobefiles.url}"/>
+-            <param name="destfile" value="${adobefiles.jar}"/>
+-        </antcall>
+         <unjar src="${adobefiles.jar}" dest="${pdfbox.dest.dir}/org/apache/pdfbox/resources/afm">
+             <patternset>
+                 <include name="com/adobe/pdf/pcfi/afm/*.afm"/>
diff --git a/pdfbox.spec b/pdfbox.spec
new file mode 100644
index 0000000..36ed56c
--- /dev/null
+++ b/pdfbox.spec
@@ -0,0 +1,253 @@
+Name:           pdfbox
+Version:        1.6.0
+Release:        2%{?dist}
+Summary:        Java library for working with PDF documents
+
+Group:          Development/Libraries
+License:        ASL 2.0
+URL:            http://pdfbox.apache.org/
+Source0:        http://www.apache.org/dist/pdfbox/%{version}/%{name}-%{version}-src.zip
+#Don't download anything
+Patch0:         %{name}-nodownload.patch
+#Use sysytem bitream-vera-sans-fonts instead of bundled fonts
+Patch1:         %{name}-1.2.0-bitstream.patch
+
+BuildRequires:  jpackage-utils
+BuildRequires:  java-devel >= 1:1.6.0
+BuildRequires:  ant
+BuildRequires:  maven
+BuildRequires:  maven-antrun-plugin
+BuildRequires:  maven-plugin-bundle
+BuildRequires:  maven-compiler-plugin
+BuildRequires:  maven-install-plugin
+BuildRequires:  maven-jar-plugin
+BuildRequires:  maven-javadoc-plugin
+BuildRequires:  maven-resources-plugin
+BuildRequires:  maven-surefire-plugin
+BuildRequires:  maven-deploy-plugin
+BuildRequires:  maven-doxia-sitetools
+BuildRequires:  maven-release-plugin
+BuildRequires:  maven-site-plugin
+BuildRequires:  maven-surefire-provider-junit
+BuildRequires:  maven-surefire-provider-junit4
+BuildRequires:  maven-war-plugin
+BuildRequires:  apache-rat-plugin
+BuildRequires:  bouncycastle-mail
+BuildRequires:  icu4j
+BuildRequires:  apache-commons-logging
+BuildRequires:  junit4
+BuildRequires:  lucene-demo >= 2.4.1
+BuildRequires:  pcfi
+
+BuildArch:      noarch
+
+Requires:       jpackage-utils
+Requires:       java >= 1:1.6.0
+Requires:       bitstream-vera-sans-fonts
+Requires:       bouncycastle-mail
+Requires:       fontbox
+Requires:       icu4j
+Requires:       apache-commons-logging
+Requires:       jempbox
+Requires:       lucene-demo >= 2.4.1
+
+%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:        Javadocs for %{name}
+Group:          Documentation
+Requires:       jpackage-utils
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+
+%package ant
+Summary:        Apache PDFBox for Ant
+Group:          Development/Libraries
+Requires:       %{name} = %{version}-%{release}
+Requires:       ant
+
+%description ant
+%{summary}.
+
+
+%package app
+Summary:        Apache PDFBox application
+Group:          Applications/Publishing
+Requires:       %{name} = %{version}-%{release}
+Requires:       bouncycastle-mail
+Requires:       icu4j
+
+%description app
+%{summary}.
+
+
+%package -n fontbox
+Summary:        Apache FontBox
+Group:          Development/Libraries
+Requires:       %{name} = %{version}-%{release}
+Requires:       junit
+
+%description -n fontbox
+FontBox is a Java library used to obtain low level information from font
+files. FontBox is a subproject of Apache PDFBox.
+
+
+%package -n jempbox
+Summary:        Apache JempBox
+Group:          Development/Libraries
+Requires:       %{name} = %{version}-%{release}
+Requires:       junit
+
+%description -n jempbox
+JempBox is an open source Java library that implements Adobe's XMP(TM)
+specification. JempBox is a subproject of Apache PDFBox.
+
+
+%package lucene
+Summary:        Apache PDFBox for Lucene
+Group:          Development/Libraries
+Requires:       %{name} = %{version}-%{release}
+Requires:       lucene-demo >= 2.4.1
+
+%description lucene
+%{summary}.
+
+
+%prep
+%setup -q
+%patch0 -p1 -b .nodownload
+%patch1 -p1 -b .bitstream
+#Use jdk16 version of bcprov
+sed -i -e s/jdk15/jdk16/g */pom.xml
+find -name '*.class' -exec rm -f '{}' \;
+find -name '*.jar' -exec rm -f '{}' \;
+#Fix line endings
+sed -i -e 's|\r||' RELEASE-NOTES.txt
+#Remove META-INF file that does not exist
+sed -i -e '/META-INF/d' pdfbox/pom.xml
+#Remove included fonts
+rm -r pdfbox/src/main/resources/org/apache/pdfbox/resources/ttf
+
+
+%build
+mvn-rpmbuild -Dadobefiles.jar=%{_javadir}/pcfi.jar install javadoc:aggregate
+
+
+%install
+mkdir -p $RPM_BUILD_ROOT%{_javadir}
+mkdir -p $RPM_BUILD_ROOT%{_javadocdir}
+mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir}
+
+for jar in */target/*.jar
+do
+  dir=$(dirname $jar)
+  target=$(dirname $dir)
+  jarname=$target
+  [ -f ${dir}/%{name}-${target}-%{version}.jar ] && jarname=%{name}-${target}
+
+  cp -p ${dir}/${jarname}-%{version}.jar \
+    $RPM_BUILD_ROOT%{_javadir}/${jarname}.jar
+
+  cp -p ${target}/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-${jarname}.pom
+  %add_maven_depmap JPP-${jarname}.pom ${jarname}.jar
+done
+
+# Javadocs
+cp -rp target/site/apidocs $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+
+#Parent
+cp -p parent/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-pdfbox-parent.pom
+%add_maven_depmap JPP-pdfbox-parent.pom
+
+#TODO - install/ship war
+
+
+%files
+%doc LICENSE.txt NOTICE.txt README.txt RELEASE-NOTES.txt
+%{_javadir}/%{name}.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavenpomdir}/JPP-%{name}-parent.pom
+%{_mavendepmapfragdir}/%{name}
+
+%files javadoc
+%doc LICENSE.txt
+%{_javadocdir}/%{name}
+
+%files ant
+%doc LICENSE.txt
+%{_javadir}/%{name}-ant.jar
+%{_mavenpomdir}/JPP-%{name}-ant.pom
+
+%files app
+%doc LICENSE.txt
+%{_javadir}/%{name}-app.jar
+%{_mavenpomdir}/JPP-%{name}-app.pom
+
+%files -n fontbox
+%doc LICENSE.txt
+%{_javadir}/fontbox.jar
+%{_mavenpomdir}/JPP-fontbox.pom
+
+%files -n jempbox
+%doc LICENSE.txt
+%{_javadir}/jempbox.jar
+%{_mavenpomdir}/JPP-jempbox.pom
+
+%files lucene
+%doc LICENSE.txt
+%{_javadir}/%{name}-lucene.jar
+%{_mavenpomdir}/JPP-%{name}-lucene.pom
+
+
+%changelog
+* Mon Oct 24 2011 Orion Poplawski <orion at cora.nwra.com> - 1.6.0-2
+- BR separately packaged pcfi
+
+* Wed Aug 10 2011 Orion Poplawski <orion at cora.nwra.com> - 1.6.0-1
+- Update to 1.6.0
+- Add pcfi-2010.08.09.jar to sources
+- Drop depmap
+- Use apache-commons-logging
+- Other cleanup
+
+* Fri Jun 3 2011 Orion Poplawski <orion at cora.nwra.com> - 1.5.0-2
+- Use maven 3
+- Single javadoc package
+
+* Thu Mar 10 2011 Orion Poplawski <orion at cora.nwra.com> - 1.5.0-1
+- Update to 1.5.0
+
+* Tue Dec 27 2010 Orion Poplawski <orion at cora.nwra.com> - 1.4.0-2
+- Create sub-packages
+- Use depmap file
+
+* Tue Dec 21 2010 Orion Poplawski <orion at cora.nwra.com> - 1.4.0-1
+- Update to 1.4.0
+
+* Sat Nov 6 2010 Orion Poplawski <orion at cora.nwra.com> - 1.3.1-1
+- Update to 1.3.1
+
+* Fri Aug 13 2010 Orion Poplawski <orion at cora.nwra.com> - 1.3.0-0.1
+- Update to 1.3.0-SNAPSHOT
+
+* Thu Jul 13 2010 Orion Poplawski <orion at cora.nwra.com> - 1.2.1-1
+- Update to 1.2.1
+
+* Thu Jul 1 2010 Orion Poplawski <orion at cora.nwra.com> - 1.2.0-1
+- Update to 1.2.0
+- Drop gcj support
+
+* Mon Oct 19 2009 Orion Poplawski <orion at cora.nwra.com> - 0.8.0-2
+- Add Requires
+
+* Thu Oct 15 2009 Orion Poplawski <orion at cora.nwra.com> - 0.8.0-1
+- Initial Fedora package
+
diff --git a/sources b/sources
index e69de29..9f8c35b 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+103c620cd58d69f107c9a63f16ba7da7  pdfbox-1.6.0-src.zip


More information about the scm-commits mailing list