apache-batik/apache-batik.spec

501 lines
17 KiB
RPMSpec
Raw Permalink Normal View History

Name: apache-batik
Version: 1.7
Release: 10mamba
Summary: Scalable Vector Graphics for Java
Group: Applications/Graphics
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://xmlgraphics.apache.org/batik/
Source0: http://mirror.tomato.it/apache/xmlgraphics/batik/batik-src-%{version}.zip
Source1: apache-batik.squiggle.script
Source2: apache-batik.svgpp.script
Source3: apache-batik.ttf2svg.script
Source4: apache-batik.rasterizer.script
Source5: apache-batik.slideshow.script
Source6: apache-batik-squiggle.desktop
Source7: apache-batik.rasterizer.policy
Source8: batik-orbit-manifests.tar.gz
Source9: batik.squiggle.policy
Patch0: apache-batik-1.7-manifests.patch
Patch1: apache-batik-1.7-policy.patch
License: Apache Software License 2.0
BuildRequires: apache-ant
%if "%{stage1}" != "1"
BuildRequires: apache-ant-trax
BuildRequires: apache-fop = 0.95
BuildRequires: apache-xml-stylebook
BuildRequires: apache-xml-crimson
BuildRequires: jython
%endif
BuildRequires: java-rhino
BuildRequires: java-rhino-javadoc
BuildRequires: jpackage-utils
BuildRequires: xalan-j2
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
BuildRequires: xml-commons-apis-javadoc
%if "%{stage1}" != "1"
Requires: java-rhino
%endif
Requires: xalan-j2
Requires: xml-commons-apis
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Batik is a Java(tm) technology based toolkit for applications that want to use images in the Scalable Vector Graphics (SVG) format for various purposes, such as viewing, generation or manipulation.
%package squiggle
Group: Applications/Graphics
Summary: Batik SVG browser
Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils
Requires: xerces-j2
%description squiggle
The Squiggle SVG Browser lets you view SVG file, zoom, pan and rotate in the content and select text items in the image and much more.
%package svgpp
Group: Applications/Graphics
Summary: Batik SVG pretty printer
Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils
Requires: xerces-j2
%description svgpp
The SVG Pretty Printer lets developers "pretty-up" their SVG files and get their tabulations and other cosmetic parameters in order. It can also be used to modify the DOCTYPE declaration on SVG files.
%package ttf2svg
Group: Applications/Graphics
Summary: Batik SVG font converter
Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils
%description ttf2svg
The SVG Font Converter lets developers convert character ranges from the True Type Font format to the SVG Font format to embed in SVG documents. This allows SVG document to be fully self-contained be rendered exactly the same on all systems.xalan-j2
%package rasterizer
Group: Applications/Graphics
Summary: Batik SVG rasterizer
Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils
Requires: xerces-j2
%description rasterizer
The SVG Rasterizer is a utility that can convert SVG files to a raster format. The tool can convert individual files or sets of files, making it easy to convert entire directories of SVG files. The supported formats are JPEG, PNG, and TIFF, however the design allows new formats to be added easily.
%package slideshow
Group: Applications/Graphics
Summary: Batik SVG slideshow
Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils
Requires: xalan-j2
Requires: xerces-j2
%description slideshow
Batik is a Java(tm) technology based toolkit for applications that want to use images in the Scalable Vector Graphics (SVG) format for various purposes, such as viewing, generation or manipulation.
This package contains Batik SVG slideshow.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
%description javadoc
Batik is a Java(tm) technology based toolkit for applications that want to use images in the Scalable Vector Graphics (SVG) format for various purposes, such as viewing, generation or manipulation.
This package contains javadoc for %{name}.
%package demo
Group: Documentation
Summary: Demo for %{name}
Requires: %{name} = %{version}-%{release}
%description demo
Batik is a Java(tm) technology based toolkit for applications that want to use images in the Scalable Vector Graphics (SVG) format for various purposes, such as viewing, generation or manipulation.
This package contains demonstrations and samples for %{name}.
%package rasterizertask
Group: Applications/Graphics
Summary: SVG Rasterizer Task for Ant
Requires: %{name} = %{version}-%{release}
%description rasterizertask
Batik is a Java(tm) technology based toolkit for applications that want to use images in the Scalable Vector Graphics (SVG) format for various purposes, such as viewing, generation or manipulation.
This package contains rasterizer task for Ant. The task can be used to convert SVG files to raster format. This has been contributed by Henri Ruini (ruini@iki.fi).
%package rasterizertask-javadoc
Group: Documentation
Summary: Javadoc for %{name}-rasterizertask
%description rasterizertask-javadoc
Batik is a Java(tm) technology based toolkit for applications that want to use images in the Scalable Vector Graphics (SVG) format for various purposes, such as viewing, generation or manipulation.
%{name}-rasterizertask can be used to convert SVG images to raster images.
This package contains javadoc for %{name}-rasterizertask.
%prep
%setup -q -n batik-%{version}
%patch0 -p1
%patch1 -p1
for j in $(find . -name "*.jar"); do
rm -rf $j
done
pushd documentation-sources/content/demo
ln -s $(build-classpath xml-commons-apis) xml-apis-dom3.jar
popd
pushd lib
%if "%{stage1}" != "1"
ln -s $(build-classpath rhino) js.jar
ln -s $(build-classpath jython) jython.jar
ln -s $(build-classpath fop-transcoder-allinone) pdf-transcoder.jar
%endif
ln -s $(build-classpath xalan-j2) xalan-2.6.0.jar
ln -s $(build-classpath xerces-j2) xerces_2_5_0.jar
ln -s $(build-classpath xml-commons-apis) xml-apis.jar
ln -s $(build-classpath xml-commons-apis-ext) xml-apis-ext.jar
pushd build
ln -s $(build-classpath ant-1.7.1) ant-1.6.5.jar
ln -s $(build-classpath ant/ant-launcher) ant-launcher-1.6.5.jar
%if "%{stage1}" != "1"
ln -s $(build-classpath crimson) crimson-1.1.3.jar
ln -s $(build-classpath xml-stylebook) stylebook.jar
%endif
popd
popd
rm resources/org/apache/batik/ext/awt/image/codec/properties
rm test-resources/org/apache/batik/apps/rasterizer/readOnly.png
mkdir orbit
pushd orbit
tar xzf %{SOURCE8}
popd
%build
export ANT_OPTS="-Xmx1024m"
sed -i 's|maxmemory="128m"|maxmemory="512m"|' build.xml
%if "%{stage1}" != "1"
#ant all-jar jars javadoc testjars maven-artifacts runtestsuite libs-jar bean
export CLASSPATH=$(build-classpath crimson js junit-3.8.2 rhino ant/ant-trax jython xml-stylebook)
CLASSPATH=$CLASSPATH:$(build-classpath xalan-j2 xerces-j2 xml-commons-apis xml-commons-apis-ext)
%else
export CLASSPATH=$(build-classpath junit-3.8.2 rhino)
CLASSPATH=$CLASSPATH:$(build-classpath xalan-j2 xerces-j2 xml-commons-apis xml-commons-apis-ext)
%endif
ant all-jar jars \
-Ddebug=on \
-Dsun-codecs.present=false \
-Dsun-codecs.disabled=true \
svg-pp-jar \
svg-slideshow-jar \
squiggle-jar \
rasterizer-jar \
ttf2svg-jar \
libs-jar bean
for j in $(find batik-%{version} -name *.jar); do
export CLASSPATH=$CLASSPATH:${j}
done
export CLASSPATH=$CLASSPATH:classes
ant \
-Ddom.javadoc=%{_javadocdir}/xml-commons-apis \
-Djdk.javadoc=%{_javadocdir}/java \
-Drhino.javadoc=%{_javadocdir}/rhino \
javadoc
pushd contrib/rasterizertask
for j in $(find ../../batik-%{version} -name *.jar); do
export CLASSPATH=$CLASSPATH:${j}
done
ant \
-Ddom.javadoc=%{_javadocdir}/xml-commons-apis \
-Djdk.javadoc=%{_javadocdir}/java \
-Drhino.javadoc=%{_javadocdir}/rhino \
jar javadoc
popd
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p META-INF
cp -p orbit/batik-bridge-MANIFEST.MF META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u batik-%{version}/lib/batik-bridge.jar META-INF/MANIFEST.MF
cp -p orbit/batik-css-MANIFEST.MF META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u batik-%{version}/lib/batik-css.jar META-INF/MANIFEST.MF
cp -p orbit/batik-dom-MANIFEST.MF META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u batik-%{version}/lib/batik-dom.jar META-INF/MANIFEST.MF
cp -p orbit/batik-dom-svg-MANIFEST.MF META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u batik-%{version}/lib/batik-svg-dom.jar META-INF/MANIFEST.MF
cp -p orbit/batik-ext-awt-MANIFEST.MF META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u batik-%{version}/lib/batik-awt-util.jar META-INF/MANIFEST.MF
cp -p orbit/batik-extension-MANIFEST.MF META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u batik-%{version}/lib/batik-extension.jar META-INF/MANIFEST.MF
cp -p orbit/batik-parser-MANIFEST.MF META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u batik-%{version}/lib/batik-parser.jar META-INF/MANIFEST.MF
cp -p orbit/batik-svggen-MANIFEST.MF META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u batik-%{version}/lib/batik-svggen.jar META-INF/MANIFEST.MF
cp -p orbit/batik-swing-MANIFEST.MF META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u batik-%{version}/lib/batik-swing.jar META-INF/MANIFEST.MF
cp -p orbit/batik-transcoder-MANIFEST.MF META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u batik-%{version}/lib/batik-transcoder.jar META-INF/MANIFEST.MF
cp -p orbit/batik-util-gui-MANIFEST.MF META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u batik-%{version}/lib/batik-gui-util.jar META-INF/MANIFEST.MF
cp -p orbit/batik-util-MANIFEST.MF META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u batik-%{version}/lib/batik-util.jar META-INF/MANIFEST.MF
cp -p orbit/batik-xml-MANIFEST.MF META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u batik-%{version}/lib/batik-xml.jar META-INF/MANIFEST.MF
mkdir -p %{buildroot}%{_javadir}
for dir in batik-%{version} batik-%{version}/lib batik-%{version}/extensions; do
pushd ${dir}
for jar in batik-*.jar; do
basename=`basename ${jar} .jar`
# name=`echo ${basename} | sed "s|batik-||g"`
cp -p ${jar} %{buildroot}%{_javadir}/${basename}-%{version}.jar
done
popd
done
#for pkg in squiggle squiggle-ext svgpp ttf2svg rasterizer rasterizer-ext slideshow; do
# ln -s ${pkg}-%{version}.jar %{buildroot}%{_javadir}/%{name}/batik-${pkg}-%{version}.jar
#done
#mv %{buildroot}%{_javadir}/all-%{version}.jar %{buildroot}%{_javadir}/batik-all-%{version}.jar
#ln -s %{name}-all-%{version}.jar %{buildroot}%{_javadir}/batik-all-%{version}.jar
# %{buildroot}%{_javadir}/batik
for dir in %{buildroot}%{_javadir} ; do
pushd ${dir}
for jar in *-%{version}*.jar; do
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
done
popd
done
mkdir -p %{buildroot}%{_bindir}
install -pm 755 %{S:1} %{buildroot}%{_bindir}/batik-squiggle
install -pm 755 %{S:2} %{buildroot}%{_bindir}/batik-svgpp
install -pm 755 %{S:3} %{buildroot}%{_bindir}/batik-ttf2svg
install -pm 755 %{S:4} %{buildroot}%{_bindir}/batik-rasterizer
install -pm 755 %{S:5} %{buildroot}%{_bindir}/batik-slideshow
mkdir -p %{buildroot}%{_datadir}/applications
install -pm 644 %{S:6} %{buildroot}%{_datadir}/applications/apache-batik-squiggle.desktop
mkdir -p %{buildroot}%{_datadir}/pixmaps
install -pm 644 resources/org/apache/batik/apps/svgbrowser/resources/squiggleIcon.png \
%{buildroot}%{_datadir}/pixmaps/squiggleIcon.png
mkdir -p %{buildroot}%{_javadocdir}/batik-%{version}
cp -pr batik-%{version}/docs/javadoc/* %{buildroot}%{_javadocdir}/batik-%{version}
ln -s batik-%{version} %{buildroot}%{_javadocdir}/batik
rm -rf batik-%{version}/docs/javadoc
mkdir -p %{buildroot}%{_datadir}/batik
cp -pr contrib resources samples test-resources test-sources \
%{buildroot}%{_datadir}/batik
chmod +x %{buildroot}%{_datadir}/batik/contrib/rasterizertask/build.sh
chmod +x %{buildroot}%{_datadir}/batik/contrib/charts/convert.sh
mkdir -p %{buildroot}%{_sysconfdir}/batik
install -pm 644 %{S:7} %{buildroot}%{_sysconfdir}/batik/rasterizer.policy
#install -pm 644 %{S:9} %{buildroot}%{_sysconfdir}/batik/batik.squiggle.policy
touch %{buildroot}%{_sysconfdir}/batik-rasterizer.conf
touch %{buildroot}%{_sysconfdir}/batik-slideshow.conf
touch %{buildroot}%{_sysconfdir}/batik-squiggle.conf
touch %{buildroot}%{_sysconfdir}/batik-svgpp.conf
touch %{buildroot}%{_sysconfdir}/batik-ttf2svg.conf
install -pm 644 contrib/rasterizertask/build/lib/RasterizerTask.jar \
%{buildroot}%{_javadir}/rasterizertask-%{version}.jar
(
cd %{buildroot}%{_javadir}
ln -sf rasterizertask-%{version}.jar rasterizertask.jar
)
#mkdir -p %{buildroot}/opt/java/ant/lib
#install -pm 644 contrib/rasterizertask/build/lib/RasterizerTask.jar \
# %{buildroot}/opt/java/ant/lib/rasterizertask.jar
#(
# cd %{buildroot}/opt/java/ant/lib
# ln -sf rasterizertask.jar rasterizertask-%{version}.jar
#)
mkdir -p %{buildroot}%{_javadocdir}/batik-rasterizertask-%{version}
cp -pr contrib/rasterizertask/doc/javadoc/* %{buildroot}%{_javadocdir}/batik-rasterizertask-%{version}
ln -s batik-rasterizertask-%{version} %{buildroot}%{_javadocdir}/batik-rasterizertask
#%{_bindir}/aot-compile-rpm
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/batik
%{_sysconfdir}/batik/rasterizer.policy
%{_javadir}/batik-all-%{version}.jar
%{_javadir}/batik-all.jar
%{_javadir}/batik-anim-%{version}.jar
%{_javadir}/batik-anim.jar
%{_javadir}/batik-awt-util-%{version}.jar
%{_javadir}/batik-awt-util.jar
%{_javadir}/batik-bean-%{version}.jar
%{_javadir}/batik-bean.jar
%{_javadir}/batik-bridge-%{version}.jar
%{_javadir}/batik-bridge.jar
%{_javadir}/batik-codec-%{version}.jar
%{_javadir}/batik-codec.jar
%{_javadir}/batik-css-%{version}.jar
%{_javadir}/batik-css.jar
%{_javadir}/batik-dom-%{version}.jar
%{_javadir}/batik-dom.jar
%{_javadir}/batik-ext-%{version}.jar
%{_javadir}/batik-ext.jar
%{_javadir}/batik-extension-%{version}.jar
%{_javadir}/batik-extension.jar
%{_javadir}/batik-gui-util-%{version}.jar
%{_javadir}/batik-gui-util.jar
%{_javadir}/batik-gvt-%{version}.jar
%{_javadir}/batik-gvt.jar
%{_javadir}/batik-libs-%{version}.jar
%{_javadir}/batik-libs.jar
%{_javadir}/batik-parser-%{version}.jar
%{_javadir}/batik-parser.jar
%{_javadir}/batik-script-%{version}.jar
%{_javadir}/batik-script.jar
%{_javadir}/batik-svg-dom-%{version}.jar
%{_javadir}/batik-svg-dom.jar
%{_javadir}/batik-svggen-%{version}.jar
%{_javadir}/batik-svggen.jar
%{_javadir}/batik-swing-%{version}.jar
%{_javadir}/batik-swing.jar
%{_javadir}/batik-transcoder-%{version}.jar
%{_javadir}/batik-transcoder.jar
%{_javadir}/batik-util-%{version}.jar
%{_javadir}/batik-util.jar
%{_javadir}/batik-xml-%{version}.jar
%{_javadir}/batik-xml.jar
%doc KEYS LICENSE MAINTAIN NOTICE README
%files squiggle
%defattr(-,root,root)
#%{_sysconfdir}/batik/batik.squiggle.policy
%config(noreplace) %{_sysconfdir}/batik-squiggle.conf
%attr(0755,root,root) %{_bindir}/batik-squiggle
%{_datadir}/applications/apache-batik-squiggle.desktop
%{_datadir}/pixmaps/squiggleIcon.png
%{_javadir}/batik-squiggle-%{version}.jar
%{_javadir}/batik-squiggle-ext-%{version}.jar
%{_javadir}/batik-squiggle-ext.jar
%{_javadir}/batik-squiggle.jar
%files svgpp
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/batik-svgpp.conf
%attr(0755,root,root) %{_bindir}/batik-svgpp
%{_javadir}/batik-svgpp-%{version}.jar
%{_javadir}/batik-svgpp.jar
%files ttf2svg
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/batik-ttf2svg.conf
%attr(0755,root,root) %{_bindir}/batik-ttf2svg
%{_javadir}/batik-ttf2svg-%{version}.jar
%{_javadir}/batik-ttf2svg.jar
%files rasterizer
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/batik-rasterizer.conf
%attr(0755,root,root) %{_bindir}/batik-rasterizer
%{_javadir}/batik-rasterizer-%{version}.jar
%{_javadir}/batik-rasterizer-ext-%{version}.jar
%{_javadir}/batik-rasterizer-ext.jar
%{_javadir}/batik-rasterizer.jar
%files slideshow
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/batik-slideshow.conf
%attr(0755,root,root) %{_bindir}/batik-slideshow
%{_javadir}/batik-slideshow-%{version}.jar
%{_javadir}/batik-slideshow.jar
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/batik-%{version}
%{_javadocdir}/batik
%files demo
%defattr(-,root,root)
%{_datadir}/batik
%files rasterizertask
%defattr(-,root,root)
%{_javadir}/rasterizertask-%{version}.jar
%{_javadir}/rasterizertask.jar
%doc contrib/rasterizertask/README
%files rasterizertask-javadoc
%defattr(-,root,root)
%{_javadocdir}/batik-rasterizertask-%{version}
%{_javadocdir}/batik-rasterizertask
%changelog
* Tue Nov 09 2010 gil <puntogil@libero.it> 1.7-10mamba
- rebuilt devel
* Mon May 31 2010 gil <puntogil@libero.it> 1.7-9mamba
- add apache-fop(transcoder) support
* Mon May 31 2010 gil <puntogil@libero.it> 1.7-8mamba
- rebuilt
* Mon May 31 2010 gil <puntogil@libero.it> 1.7-7mamba
- rebuilt with sun-java 6u20 support
* Mon May 31 2010 gil <puntogil@libero.it> 1.7-6mamba
- rebuilt with jython support
* Fri Nov 20 2009 gil <puntogil@libero.it> 1.7-5mamba
- added apache-fop java-xml-stylebook support
* Mon Jun 08 2009 gil <puntogil@libero.it> 1.7-4mamba
- added sub package rasterizertask
* Mon Jun 08 2009 gil <puntogil@libero.it> 1.7-3mamba
- rebuilt added OSGi manifest
* Mon Jun 08 2009 gil <puntogil@libero.it> 1.7-2mamba
- rebuilt
* Wed Mar 04 2009 gil <puntogil@libero.it> 1.7-1mamba
- package created by autospec