232 lines
7.8 KiB
RPMSpec
232 lines
7.8 KiB
RPMSpec
%define offo_version 1.2
|
|
%define javahome /usr/lib/jvm/java
|
|
Name: apache-fop
|
|
Version: 0.95
|
|
Release: 7mamba
|
|
Summary: Apache Formatting Objects Processor
|
|
Group: Applications/Publishing
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: gil <puntogil@libero.it>
|
|
URL: http://xmlgraphics.apache.org/fop/
|
|
#Source0: http://archive.apache.org/dist/xmlgraphics/fop/source/fop-%{version}-src.tar.gz
|
|
# jsvn export http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-0_95/ fop-0.95
|
|
Source0: fop-%{version}-src-svn.tar.gz
|
|
Source1: apache-fop.script
|
|
Source2: apache-fop-0.94-batik-pdf-MANIFEST.MF
|
|
Source3: http://downloads.sourceforge.net/project/offo/offo-hyphenation/%{offo_version}/offo-hyphenation_v%{offo_version}.zip
|
|
Patch0: apache-fop-0.94-manifest.patch
|
|
Patch1: apache-fop-0.94-main.patch
|
|
Patch2: apache-fop-0.94-build_xml.patch
|
|
License: Apache Software License 2.0
|
|
BuildRequires: apache-ant
|
|
BuildRequires: apache-ant-junit
|
|
BuildRequires: apache-ant-trax
|
|
BuildRequires: apache-batik = 1.7
|
|
BuildRequires: apache-batik-javadoc = 1.7
|
|
BuildRequires: apache-log4j
|
|
BuildRequires: apache-tomcat5-servletapi5
|
|
BuildRequires: jakarta-commons-httpclient
|
|
BuildRequires: jakarta-commons-io
|
|
BuildRequires: jakarta-commons-logging
|
|
BuildRequires: java-excalibur-avalon-logkit
|
|
BuildRequires: java-excalibur-avalon-framework-api
|
|
BuildRequires: java-excalibur-avalon-framework-impl
|
|
BuildRequires: java-openjdk
|
|
BuildRequires: java-junit3
|
|
BuildRequires: java-sun-jai
|
|
BuildRequires: xalan-j2
|
|
BuildRequires: xmlgraphics-commons = 1.3.1
|
|
BuildRequires: xml-commons-apis
|
|
BuildRequires: xmlunit
|
|
Requires: apache-ant
|
|
Requires: apache-batik = 1.7
|
|
Requires: jakarta-commons-httpclient
|
|
Requires: jakarta-commons-io
|
|
Requires: jakarta-commons-logging
|
|
Requires: java-excalibur-avalon-logkit
|
|
Requires: java-excalibur-avalon-framework-api
|
|
Requires: java-excalibur-avalon-framework-impl
|
|
Requires: xalan-j2
|
|
Requires: xmlgraphics-commons = 1.3.1
|
|
Requires: xml-commons-apis
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
%description
|
|
Apache FOP is the world's first print formatter driven by XSL formatting
|
|
objects (XSL-FO) and the world's first output independent formatter. It
|
|
is a Java application that reads a formatting object (FO) tree and
|
|
renders the resulting pages to a specified output. Output formats
|
|
currently supported include PDF, PCL, PS, AFP, TIFF, PNG, SVG, XML (area
|
|
tree representation), Print, AWT and TXT. The primary output target is PDF.
|
|
|
|
%package javadoc
|
|
Group: Documentation
|
|
Summary: Manual for %{name}
|
|
|
|
%description javadoc
|
|
FOP is the world's first print formatter driven by XSL formatting
|
|
objects. It is a Java application that reads a formatting object tree
|
|
and then turns it into a PDF document. The formatting object tree, can
|
|
be in the form of an XML document (output by an XSLT engine like XT or
|
|
Xalan) or can be passed in memory as a DOM Document or (in the case of
|
|
XT) SAX events.
|
|
|
|
This package contains documentation for %{name}.
|
|
|
|
%prep
|
|
|
|
%setup -q -n fop-%{version} -a 3
|
|
%patch0 -p1
|
|
%patch1 -p0
|
|
%patch2 -p0
|
|
|
|
mv offo-hyphenation/hyph/*.xml hyph
|
|
|
|
for j in $(find . -name "*.jar"); do
|
|
mv $j ${j}.no
|
|
done
|
|
|
|
pushd lib
|
|
ln -s $(build-classpath excalibur/avalon-logkit)
|
|
ln -s $(build-classpath excalibur/avalon-framework) avalon-framework-4.2.0.jar
|
|
# ln -s $(build-classpath batik-anim)
|
|
# ln -s $(build-classpath batik-awt-util)
|
|
# ln -s $(build-classpath batik-bridge)
|
|
# ln -s $(build-classpath batik-css)
|
|
# ln -s $(build-classpath batik-dom)
|
|
# ln -s $(build-classpath batik-ext)
|
|
# ln -s $(build-classpath batik-extension)
|
|
# ln -s $(build-classpath batik-gvt)
|
|
# ln -s $(build-classpath batik-parser)
|
|
# ln -s $(build-classpath batik-svg-dom)
|
|
# ln -s $(build-classpath batik-svggen)
|
|
# ln -s $(build-classpath batik-script)
|
|
# ln -s $(build-classpath batik-transcoder)
|
|
# ln -s $(build-classpath batik-util)
|
|
# ln -s $(build-classpath batik-xml)
|
|
ln -s $(build-classpath batik-all) batik-all-1.7.jar
|
|
ln -s $(build-classpath commons-io) commons-io-1.3.1.jar
|
|
ln -s $(build-classpath commons-logging) commons-logging-1.0.4.jar
|
|
ln -s $(build-classpath servletapi5) servlet-2.2.jar
|
|
ln -s $(build-classpath xalan-j2) xalan-2.7.0.jar
|
|
ln -s $(build-classpath xalan-j2-serializer) serializer-2.7.0.jar
|
|
ln -s $(build-classpath xercesImpl) xercesImpl-2.7.1.jar
|
|
ln -s $(build-classpath xml-commons-apis) xml-apis-1.3.04.jar
|
|
ln -s $(build-classpath xml-commons-apis-ext) xml-apis-ext-1.3.04.jar
|
|
ln -s $(build-classpath xmlgraphics-commons) xmlgraphics-commons-1.3.1.jar
|
|
ln -s $(build-classpath xmlunit)
|
|
popd
|
|
|
|
%build
|
|
|
|
export JAVA_HOME=%javahome
|
|
export CLASSPATH=$(build-classpath jai junit-3.8.2 log4j ant/ant-junit ant/ant-trax)
|
|
# for test
|
|
DISPLAY=:0.0
|
|
export DISPLAY
|
|
# TODO [junit] log4j:WARN Please initialize the log4j system properly
|
|
ant \
|
|
-Dant.build.javac.source=1.4 \
|
|
-Dant.build.javac.target=1.4 \
|
|
-Djava.awt.headless=true \
|
|
-Dbatik.javadoc=%{_javadocdir}/batik \
|
|
package transcoder-pkg junit maven-artifacts
|
|
|
|
# examples
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
# OSGi manifests
|
|
mkdir -p META-INF
|
|
cp -p %{SOURCE2} META-INF/MANIFEST.MF
|
|
touch META-INF/MANIFEST.MF
|
|
zip -u build/fop.jar META-INF/MANIFEST.MF
|
|
|
|
mkdir -p %{buildroot}%{_javadir}
|
|
mkdir -p %{buildroot}%{_datadir}/maven2/poms
|
|
|
|
install -pm 644 build/fop.jar %{buildroot}%{_javadir}/fop-%{version}.jar
|
|
install -pm 644 build/fop-transcoder.jar %{buildroot}%{_javadir}/fop-pdf-transcoder-%{version}.jar
|
|
install -pm 644 build/fop-sandbox.jar %{buildroot}%{_javadir}/fop-sandbox-%{version}.jar
|
|
install -pm 644 build/fop-transcoder-allinone.jar %{buildroot}%{_javadir}/fop-transcoder-allinone-%{version}.jar
|
|
install -pm 644 build/fop-hyph.jar %{buildroot}%{_javadir}/fop-hyph-%{version}.jar
|
|
|
|
install -pm 644 build/maven/pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-fop.pom
|
|
%add_to_maven_depmap org.apache.xmlgraphics fop %{version} JPP fop
|
|
|
|
(
|
|
cd %{buildroot}%{_javadir}
|
|
for jar in *-%{version}*
|
|
do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
|
|
done
|
|
)
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
install -pm 755 %{SOURCE1} %{buildroot}%{_bindir}/fop
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/fop
|
|
cp -pr conf %{buildroot}%{_datadir}/fop
|
|
cp -pr hyph %{buildroot}%{_datadir}/fop
|
|
cp -pr offo-hyphenation/images %{buildroot}%{_datadir}/fop/
|
|
cp -pr offo-hyphenation/skin %{buildroot}%{_datadir}/fop/
|
|
|
|
mkdir -p %{buildroot}%{_javadocdir}/fop-%{version}
|
|
cp -pr build/javadocs/* %{buildroot}%{_javadocdir}/fop-%{version}
|
|
ln -s fop-%{version} %{buildroot}%{_javadocdir}/fop
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%post
|
|
%update_maven_depmap
|
|
|
|
%postun
|
|
%update_maven_depmap
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%attr(755,root,root)%{_bindir}/fop
|
|
%{_javadir}/fop-%{version}.jar
|
|
%{_javadir}/fop.jar
|
|
%{_javadir}/fop-pdf-transcoder-%{version}.jar
|
|
%{_javadir}/fop-pdf-transcoder.jar
|
|
%{_javadir}/fop-hyph-%{version}.jar
|
|
%{_javadir}/fop-hyph.jar
|
|
%{_javadir}/fop-sandbox-%{version}.jar
|
|
%{_javadir}/fop-sandbox.jar
|
|
%{_javadir}/fop-transcoder-allinone-%{version}.jar
|
|
%{_javadir}/fop-transcoder-allinone.jar
|
|
%{_datadir}/fop
|
|
%{_datadir}/maven2/poms
|
|
%{_mavendepmapfragdir}
|
|
%doc LICENSE NOTICE README
|
|
|
|
%files javadoc
|
|
%defattr(-,root,root)
|
|
%{_javadocdir}/fop-%{version}
|
|
%{_javadocdir}/fop
|
|
|
|
%changelog
|
|
* Thu Mar 24 2011 gil <puntogil@libero.it> 0.95-7mamba
|
|
- rebuilt with java-openjdk support
|
|
|
|
* Tue Nov 09 2010 gil <puntogil@libero.it> 0.95-6mamba
|
|
- rebuilt devel
|
|
- added sun jai support
|
|
|
|
* Mon Aug 30 2010 gil <puntogil@libero.it> 0.95-5mamba
|
|
- added offo hyphenation support
|
|
|
|
* Fri Nov 20 2009 gil <puntogil@libero.it> 0.95-4mamba
|
|
- added OSGi manifests
|
|
|
|
* Fri Nov 20 2009 gil <puntogil@libero.it> 0.95-3mamba
|
|
- added maven support
|
|
|
|
* Thu Nov 19 2009 gil <puntogil@libero.it> 0.95-2mamba
|
|
- added xmlunit support
|
|
|
|
* Wed Mar 04 2009 gil <puntogil@libero.it> 0.95-1mamba
|
|
- package created by autospec
|