packages apache-pdfbox.spec
      Pages: < 1 >  DOWNLOAD      
Name:          apache-pdfbox
Version:       0.8.0
Release:       1mamba
Summary:       Java PDF Library
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://incubator.apache.org/pdfbox/
# svn export http://svn.eu.apache.org/repos/asf/incubator/pdfbox/trunk pdfbox-0.8.0
Source0:       pdfbox-%{version}-src-svn.tar.gz
License:       Apache Software License Version 2.0
BuildRequires: antlr
BuildRequires: apache-ant
BuildRequires: apache-fontbox
BuildRequires: apache-jempbox
BuildRequires: apache-log4j
BuildRequires: jakarta-commons-beanutils
BuildRequires: jakarta-commons-logging
BuildRequires: jakarta-regexp
BuildRequires: java-bouncycastle
BuildRequires: java-bouncycastle-mail
BuildRequires: java-checkstyle
BuildRequires: java-icu4j401
BuildRequires: java-junit45
BuildRequires: java-lucene
BuildRequires: java-lucene-demo
BuildRequires: jpackage-utils
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
Requires:      apache-fontbox
Requires:      apache-jempbox
Requires:      apache-log4j
Requires:      java-lucene
Requires:      xerces-j2
Requires:      xml-commons-apis
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%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.

Features

* PDF to text extraction
* Merge PDF Documents
* PDF Document Encryption/Decryption
* Lucene Search Engine Integration
* Fill in form data FDF and XFDF
* Create a PDF from a text file
* Create images from PDF pages
* Print a PDF

%package demo
Group:         Development/Libraries/Java
Summary:       Demo for %{name}
Requires:      %{name} = %{version}-%{release}

%description demo
Apache PDFBox is an open source Java PDF library for working with PDF documents.

This package contains demonstrations and samples for %{name}.

%package javadoc
Group:          Documentation
Summary:        Javadoc for %{name}

%description javadoc
Apache PDFBox is an open source Java PDF library for working with PDF documents.

This package contains javadoc for %{name}.

%prep

%setup -q -n pdfbox-%{version}

for j in $(find . -name "*.jar"); do
	mv $j ${j}.no
done

%build
export CLASSPATH=$(build-classpath junit45 jempbox lucene lucene-demos xml-commons-apis \
	fontbox bcprov bcmail icu4j401 xerces-j2 regexp log4j ant/ant-nodeps)
ant \
	-Dbuild.sysclasspath=first  \
	-Dcheckstyle.jar=$(build-classpath checkstyle) \
        -Dant.jar=$(build-classpath ant) \
	-Dfontbox.jar=$(build-classpath fontbox) \
	-Dfontbox.jar=$(build-classpath jempbox) \
	-Dlucene.jar=$(build-classpath lucene-core) \
	-Dlucene-demos.jar=$(build-classpath lucene-demos) \
	-Dbcprov.jar=$(build-classpath bcprov) \
	-Dbcmail.jar=$(build-classpath bcmail) \
	-Djunit.jar=$(build-classpath junit45) \
	-Dicu4j.jar=$(build-classpath icu4j/icu4j) \
	package javadoc

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}
mkdir -p %{buildroot}%{_datadir}/maven2/poms

install -pm 644 lib/pdfbox-%{version}-incubating.jar \
 	%{buildroot}%{_javadir}/pdfbox-%{version}.jar


install -m 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-pdfbox.pom
%add_to_maven_depmap org.apache.pdfbox pdfbox %{version} JPP pdfbox

mkdir -p %{buildroot}%{_datadir}/pdfbox-%{version}
cp -pr lib/pdfbox.war %{buildroot}%{_datadir}/pdfbox-%{version}/

(
	cd %{buildroot}%{_javadir}
	for jar in *-%{version}.jar; do
		ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
	done
)

mkdir -p  %{buildroot}%{_javadocdir}/pdfbox-%{version}
cp -pr website/build/site/javadoc/* %{buildroot}%{_javadocdir}/pdfbox-%{version}
ln -s pdfbox-%{version} %{buildroot}%{_javadocdir}/pdfbox

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%{_javadir}/pdfbox-%{version}.jar
%{_javadir}/pdfbox.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc *.txt

%files demo
%defattr(-,root,root)
%{_datadir}/pdfbox-%{version}

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/pdfbox-%{version}
%{_javadocdir}/pdfbox

%changelog
* Sun Jul 12 2009 gil <puntogil@...> 0.8.0-1mamba
- package created by autospec