# Copyright (c) 2000-2008, JPackage Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the # distribution. # 3. Neither the name of the JPackage Project nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # %define ucname PDFBox Name: pdfbox Epoch: 0 Version: 0.7.3 Release: 2%{?dist} Summary: PDF processing library Group: Development/Libraries License: BSD URL: http://www.pdfbox.org/ Source0: %{ucname}-%{version}.zip Source1: pdfbox-extract-expected.txt Source2: fdeb.pdf Source3: FreedomExpressions.pdf Source4: FreedomExpressions.fdf Source5: pdf_with_lots_of_fields.pdf Source6: http://mirrors.ibiblio.org/pub/mirrors/maven2/pdfbox/pdfbox/0.7.3/pdfbox-0.7.3.pom BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: jpackage-utils >= 0:1.7.3 BuildRequires: java-devel >= 0:1.5.0 BuildRequires: ant >= 0:1.6.5 BuildRequires: ant-junit BuildRequires: ant-nodeps BuildRequires: bouncycastle BuildRequires: checkstyle BuildRequires: fontbox BuildRequires: junit BuildRequires: lucene BuildRequires: lucene-demo Requires: java >= 0:1.5.0 Requires: bouncycastle Requires: fontbox Requires: lucene Requires: lucene-demo Requires(post): jpackage-utils >= 0:1.7.3 Requires(postun): jpackage-utils >= 0:1.7.3 %description PDFBox is a Java PDF Library. This project will allow access to all of the components in a PDF document. More PDF manipulation features will be added as the project matures. This ships with a utility to take a PDF document and output a text file. %package javadoc Summary: Javadoc for %{name} Group: Documentation %description javadoc %{summary}. %package manual Summary: Documents for %{name} Group: Documentation %description manual %{summary}. %prep %setup -q -n %{ucname}-%{version} %{__chmod} -R go=u-w * for j in $(find . -name "*.jar"); do %{__mv} $j $j.no done %{__mkdir_p} test/input %{__cp} Resources/cmap/00_ReadMe.pdf test/input %{__cp} %{SOURCE1} test/input/00_ReadMe.pdf.txt %{__cp} %{SOURCE2} test/input/ %{__cp} %{SOURCE3} test/input/ %{__cp} %{SOURCE4} test/input/ %{__cp} %{SOURCE5} test/input/ build-jar-repository external \ ant \ bcmail \ bcprov \ fontbox \ junit \ lucene \ lucene-demos %build export OPT_JAR_LIST="ant/ant-nodeps ant/ant-junit junit" ant \ -Dant.jar=$(build-classpath ant) \ -Dcheckstyle.jar=$(build-classpath checkstyle) \ -Dfontbox.jar=$(build-classpath fontbox) \ -Dlucene.jar=$(build-classpath lucene) \ -Dlucene-demos.jar=$(build-classpath lucene-demos) \ -Dbcprov.jar=$(build-classpath bcprov) \ -Dbcmail.jar=$(build-classpath bcmail) \ -Djunit.jar=$(build-classpath junit) \ package javadoc %check ant \ -Dant.jar=$(build-classpath ant) \ -Dcheckstyle.jar=$(build-classpath checkstyle) \ -Dfontbox.jar=$(build-classpath fontbox) \ -Dlucene.jar=$(build-classpath lucene) \ -Dlucene-demos.jar=$(build-classpath lucene-demos) \ -Dbcprov.jar=$(build-classpath bcprov) \ -Dbcmail.jar=$(build-classpath bcmail) \ -Djunit.jar=$(build-classpath junit) \ test %install %{__rm} -rf $RPM_BUILD_ROOT # jars %{__install} -d -m 755 $RPM_BUILD_ROOT%{_javadir} %{__install} -m 644 lib/%{ucname}-%{version}-dev.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar (cd $RPM_BUILD_ROOT%{_javadir} for jar in *-%{version}* do %{__ln_s} -f ${jar} `echo $jar| %{__sed} "s|-%{version}||g"` done) %add_to_maven_depmap %{name} %{name} %{version} JPP %{name} # pom %{__install} -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms %{__install} -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom %{__install} -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/Resources %{__cp} -pr Resources/* $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/Resources # javadoc %{__install} -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} %{__cp} -pr docs/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} %{__ln_s} %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink # manual %{__install} -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{__rm} -rf docs/javadoc %{__cp} -pr docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %clean %{__rm} -rf $RPM_BUILD_ROOT %post %update_maven_depmap %postun %update_maven_depmap %files %defattr(-,root,root,-) %{_javadir}/*.jar %{_datadir}/%{name}-%{version} %{_datadir}/maven2/poms/* %{_mavendepmapfragdir}/* %files javadoc %defattr(-,root,root,-) %doc %{_javadocdir}/%{name}-%{version} %doc %{_javadocdir}/%{name} %files manual %defattr(-,root,root,-) %doc %{_docdir}/%{name}-%{version} %changelog * Thu Jul 16 2009 Alexander Kahl - 0:0.7.3-2 - re-release for Fedora - general cleanup - invalid group Development/Java -> Development/Libraries - invalid group Development/Documentation -> Documentation - ant test -> %%check - checkstyle4 -> checkstyle * Tue Mar 31 2009 Ralph Apel 0:0.7.3-1.jpp5 - First JPP-5 release * Fri Nov 23 2007 Sebastiano Vigna 0:0.7.1-2jpp - Fixed install part * Fri Jul 22 2005 Ralph Apel 0:0.7.1-1jpp - Upgrade to 0.7.1 - Added unit test input files as separate sources * Tue Feb 15 2005 Ralph Apel 0:0.7.0-1jpp - Upgrade to 0.7.0 * Fri Oct 08 2004 Ralph Apel 0:0.6.6-1jpp - First release