ALT Linux repositórios
Group :: Desenvolvimento/Java
RPM: pdfbox
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
BuildRequires: checkstyle jakarta-commons-beanutils jakarta-commons-logging regexp
BuildRequires: /proc
BuildRequires: jpackage-1.4-compat
%define name pdfbox
%define ucname PDFBox
%define version 0.7.1
%define release 2jpp
Name: %{name}
Summary: PDFBox pdf library
Url: http://www.pdfbox.org/
Version: %{version}
Release: alt1_2jpp1.7
Epoch: 0
License: BSD
Group: Development/Java
BuildArch: noarch
Source0: %{ucname}-%{version}.tar.bz2
Source1: pdfbox-extract-expected.txt
Source2: fdeb.pdf
Source3: FreedomExpressions.pdf
Source4: FreedomExpressions.fdf
Source5: pdf_with_lots_of_fields.pdf
Patch0: pdfbox-build_xml.patch
BuildRequires: jpackage-utils >= 0:1.5
BuildRequires: ant >= 0:1.6
BuildRequires: junit
BuildRequires: log4j
BuildRequires: lucene1
BuildRequires: lucene1-demo
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
Requires: log4j
Requires: lucene1
Requires: xerces-j2
Requires: xml-commons-apis
%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: Development/Documentation
%description javadoc
Javadoc for %{name}.
%prep
%setup -q -n %{ucname}-%{version}
chmod -R go=u-w *
find . -name "*.jar" -exec rm -f {} \;
cp log4j.xml Config
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/
%patch0 -b .sav
%build
export OPT_JAR_LIST="ant/ant-junit junit log4j"
build-jar-repository external \
ant \
antlr \
checkstyle \
commons-beanutils \
commons-logging \
junit \
log4j \
lucene-demos lucene \
regexp \
xerces-j2 \
xml-commons-apis
pushd external
ln -sf %{_datadir}/lucene/lucene-demos-*.jar lucene-demos.jar
popd
export CLASSPATH=$(build-classpath \
log4j \
)
#lucene \
#xerces-j2 \
#xml-commons-apis \
#CLASSPATH=$CLASSPATH:%{_datadir}/lucene/lucene-demos-1.3.jar
#ant -Dbuild.sysclasspath=first dist test indexTestDocuments
ant -Dfile=00_ReadMe.pdf dist test indexTestDocuments
%install
rm -rf %{buildroot}
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 lib/%{ucname}-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# jars
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
%files
%{_javadir}/*.jar
%doc LICENSE
%{_datadir}/%{name}-%{version}
%files javadoc
%{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}
%changelog
…
Todas as alterações você pod ver aqui
BuildRequires: /proc
BuildRequires: jpackage-1.4-compat
%define name pdfbox
%define ucname PDFBox
%define version 0.7.1
%define release 2jpp
Name: %{name}
Summary: PDFBox pdf library
Url: http://www.pdfbox.org/
Version: %{version}
Release: alt1_2jpp1.7
Epoch: 0
License: BSD
Group: Development/Java
BuildArch: noarch
Source0: %{ucname}-%{version}.tar.bz2
Source1: pdfbox-extract-expected.txt
Source2: fdeb.pdf
Source3: FreedomExpressions.pdf
Source4: FreedomExpressions.fdf
Source5: pdf_with_lots_of_fields.pdf
Patch0: pdfbox-build_xml.patch
BuildRequires: jpackage-utils >= 0:1.5
BuildRequires: ant >= 0:1.6
BuildRequires: junit
BuildRequires: log4j
BuildRequires: lucene1
BuildRequires: lucene1-demo
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
Requires: log4j
Requires: lucene1
Requires: xerces-j2
Requires: xml-commons-apis
%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: Development/Documentation
%description javadoc
Javadoc for %{name}.
%prep
%setup -q -n %{ucname}-%{version}
chmod -R go=u-w *
find . -name "*.jar" -exec rm -f {} \;
cp log4j.xml Config
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/
%patch0 -b .sav
%build
export OPT_JAR_LIST="ant/ant-junit junit log4j"
build-jar-repository external \
ant \
antlr \
checkstyle \
commons-beanutils \
commons-logging \
junit \
log4j \
lucene-demos lucene \
regexp \
xerces-j2 \
xml-commons-apis
pushd external
ln -sf %{_datadir}/lucene/lucene-demos-*.jar lucene-demos.jar
popd
export CLASSPATH=$(build-classpath \
log4j \
)
#lucene \
#xerces-j2 \
#xml-commons-apis \
#CLASSPATH=$CLASSPATH:%{_datadir}/lucene/lucene-demos-1.3.jar
#ant -Dbuild.sysclasspath=first dist test indexTestDocuments
ant -Dfile=00_ReadMe.pdf dist test indexTestDocuments
%install
rm -rf %{buildroot}
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 lib/%{ucname}-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# jars
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
%files
%{_javadir}/*.jar
%doc LICENSE
%{_datadir}/%{name}-%{version}
%files javadoc
%{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}
%changelog
…
Todas as alterações você pod ver aqui