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 %defattr(-,root,root,-) %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 - 1.6.0-2 - BR separately packaged pcfi * Wed Aug 10 2011 Orion Poplawski - 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 - 1.5.0-2 - Use maven 3 - Single javadoc package * Thu Mar 10 2011 Orion Poplawski - 1.5.0-1 - Update to 1.5.0 * Tue Dec 27 2010 Orion Poplawski - 1.4.0-2 - Create sub-packages - Use depmap file * Tue Dec 21 2010 Orion Poplawski - 1.4.0-1 - Update to 1.4.0 * Sat Nov 6 2010 Orion Poplawski - 1.3.1-1 - Update to 1.3.1 * Fri Aug 13 2010 Orion Poplawski - 1.3.0-0.1 - Update to 1.3.0-SNAPSHOT * Thu Jul 13 2010 Orion Poplawski - 1.2.1-1 - Update to 1.2.1 * Thu Jul 1 2010 Orion Poplawski - 1.2.0-1 - Update to 1.2.0 - Drop gcj support * Mon Oct 19 2009 Orion Poplawski - 0.8.0-2 - Add Requires * Thu Oct 15 2009 Orion Poplawski - 0.8.0-1 - Initial Fedora package