diff --git a/.batik.metadata b/.batik.metadata new file mode 100644 index 0000000..34c12ac --- /dev/null +++ b/.batik.metadata @@ -0,0 +1,2 @@ +4e11a9855336d8bdcb12d98f48d14227995688fa SOURCES/batik-repack-1.8.zip +b4448af8f2b84c916ce64085aee9f0df530628bb SOURCES/batik-1.6-orbit-manifests.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/batik-1.6-nosmilInDOMSVGManifest.patch b/SOURCES/batik-1.6-nosmilInDOMSVGManifest.patch new file mode 100644 index 0000000..0add895 --- /dev/null +++ b/SOURCES/batik-1.6-nosmilInDOMSVGManifest.patch @@ -0,0 +1,12 @@ +--- ./batik-dom-svg-MANIFEST.MF 2011-07-08 13:40:27.911556763 -0400 ++++ ./batik-dom-svg-MANIFEST.MF 2011-07-08 13:41:33.834333213 -0400 +@@ -8,8 +8,7 @@ + g.apache.batik.dom;bundle-version="[1.6.0,1.7.0)",org.apache.batik.pa + rser;bundle-version="[1.6.0,1.7.0)",org.apache.batik.util;bundle-vers + ion="[1.6.0,1.7.0)",org.w3c.css.sac;bundle-version="[1.3.0,1.4.0)",or +- g.w3c.dom.smil;bundle-version="[1.0.0,1.1.0)",org.w3c.dom.svg;bundle- +- version="[1.1.0,1.3.0)" ++ g.w3c.dom.svg;bundle-version="[1.1.0,1.3.0)" + Bundle-Version: 1.6.0.v201011041432 + Export-Package: org.apache.batik.dom.svg;version="1.6.0",org.apache.ba + tik.dom.svg12;version="1.6.0" diff --git a/SOURCES/batik-manifests.patch b/SOURCES/batik-manifests.patch new file mode 100644 index 0000000..193d3a0 --- /dev/null +++ b/SOURCES/batik-manifests.patch @@ -0,0 +1,151 @@ +diff -ruN batik-1.8.old/sources/batik-browser-ext.mf batik-1.8/sources/batik-browser-ext.mf +--- batik-1.8.old/sources/batik-browser-ext.mf 2007-03-26 11:53:18.000000000 -0400 ++++ batik-1.8/sources/batik-browser-ext.mf 2007-11-23 12:30:47.000000000 -0500 +@@ -1,4 +1,2 @@ + Manifest-Version: 1.0 +-Class-Path: ../batik-squiggle.jar \ +- ../lib/batik-extension.jar + Main-Class: org.apache.batik.apps.svgbrowser.Main +diff -ruN batik-1.8.old/sources/batik-browser.mf batik-1.8/sources/batik-browser.mf +--- batik-1.8.old/sources/batik-browser.mf 2007-03-26 11:53:18.000000000 -0400 ++++ batik-1.8/sources/batik-browser.mf 2007-11-23 12:30:03.000000000 -0500 +@@ -1,23 +1,2 @@ + Manifest-Version: 1.0 + Main-Class: org.apache.batik.apps.svgbrowser.Main +-Class-Path: lib/batik-ext.jar \ +- lib/batik-dom.jar \ +- lib/batik-css.jar \ +- lib/batik-svg-dom.jar \ +- lib/batik-gvt.jar \ +- lib/batik-parser.jar \ +- lib/batik-script.jar \ +- lib/batik-bridge.jar \ +- lib/batik-swing.jar \ +- lib/batik-anim.jar \ +- lib/batik-transcoder.jar \ +- lib/batik-gui-util.jar \ +- lib/batik-awt-util.jar \ +- lib/batik-codec.jar \ +- lib/batik-util.jar \ +- lib/batik-xml.jar \ +- lib/xerces_2_5_0.jar \ +- lib/xalan-2.6.0.jar \ +- lib/xml-apis.jar \ +- lib/xml-apis-ext.jar \ +- lib/js.jar +diff -ruN batik-1.8.old/sources/batik.mf batik-1.8/sources/batik.mf +--- batik-1.8.old/sources/batik.mf 2007-03-26 11:53:18.000000000 -0400 ++++ batik-1.8/sources/batik.mf 2007-11-23 12:31:02.000000000 -0500 +@@ -1,29 +1,2 @@ + Manifest-Version: 1.0 + Main-Class: org.apache.batik.apps.svgbrowser.Main +-Class-Path: lib/batik-ext.jar \ +- lib/batik-dom.jar \ +- lib/batik-css.jar \ +- lib/batik-svg-dom.jar \ +- lib/batik-gvt.jar \ +- lib/batik-parser.jar \ +- lib/batik-script.jar \ +- lib/batik-bridge.jar \ +- lib/batik-swing.jar \ +- lib/batik-anim.jar \ +- lib/batik-transcoder.jar \ +- lib/batik-gui-util.jar \ +- lib/batik-awt-util.jar \ +- lib/batik-codec.jar \ +- lib/batik-util.jar \ +- lib/batik-root.jar \ +- lib/batik-svggen.jar \ +- lib/batik-xml.jar \ +- batik-squiggle.jar \ +- batik-rasterizer.jar \ +- batik-pp.jar \ +- lib/xerces_2_5_0.jar \ +- lib/xalan-2.6.0.jar \ +- lib/xml-apis.jar \ +- lib/xml-apis-ext.jar \ +- lib/pdf-transcoder.jar \ +- lib/js.jar +diff -ruN batik-1.8.old/sources/batik-pp.mf batik-1.8/sources/batik-pp.mf +--- batik-1.8.old/sources/batik-pp.mf 2007-03-26 11:53:18.000000000 -0400 ++++ batik-1.8/sources/batik-pp.mf 2007-11-23 12:30:39.000000000 -0500 +@@ -1,10 +1,2 @@ + Manifest-Version: 1.0 + Main-Class: org.apache.batik.apps.svgpp.Main +-Class-Path: lib/batik-ext.jar \ +- lib/batik-dom.jar \ +- lib/batik-parser.jar \ +- lib/batik-transcoder.jar \ +- lib/batik-util.jar \ +- lib/batik-xml.jar \ +- lib/xml-apis.jar \ +- lib/xml-apis-ext.jar +diff -ruN batik-1.8.old/sources/batik-rasterizer-ext.mf batik-1.8/sources/batik-rasterizer-ext.mf +--- batik-1.8.old/sources/batik-rasterizer-ext.mf 2007-03-26 11:53:18.000000000 -0400 ++++ batik-1.8/sources/batik-rasterizer-ext.mf 2007-11-23 12:30:54.000000000 -0500 +@@ -1,4 +1,2 @@ + Manifest-Version: 1.0 +-Class-Path: ../batik-rasterizer.jar \ +- ../lib/batik-extension.jar + Main-Class: org.apache.batik.apps.rasterizer.Main +diff -ruN batik-1.8.old/sources/batik-rasterizer.mf batik-1.8/sources/batik-rasterizer.mf +--- batik-1.8.old/sources/batik-rasterizer.mf 2007-03-26 11:53:18.000000000 -0400 ++++ batik-1.8/sources/batik-rasterizer.mf 2007-11-23 12:30:20.000000000 -0500 +@@ -1,22 +1,2 @@ + Manifest-Version: 1.0 + Main-Class: org.apache.batik.apps.rasterizer.Main +-Class-Path: lib/batik-ext.jar \ +- lib/batik-dom.jar \ +- lib/batik-css.jar \ +- lib/batik-svg-dom.jar \ +- lib/batik-gvt.jar \ +- lib/batik-parser.jar \ +- lib/batik-script.jar \ +- lib/batik-bridge.jar \ +- lib/batik-anim.jar \ +- lib/batik-transcoder.jar \ +- lib/batik-awt-util.jar \ +- lib/batik-codec.jar \ +- lib/batik-util.jar \ +- lib/batik-xml.jar \ +- lib/xerces_2_5_0.jar \ +- lib/xalan-2.6.0.jar \ +- lib/xml-apis.jar \ +- lib/xml-apis-ext.jar \ +- lib/pdf-transcoder.jar \ +- lib/js.jar +diff -ruN batik-1.8.old/sources/batik-slideshow.mf batik-1.8/sources/batik-slideshow.mf +--- batik-1.8.old/sources/batik-slideshow.mf 2007-03-26 11:53:18.000000000 -0400 ++++ batik-1.8/sources/batik-slideshow.mf 2007-11-23 12:30:31.000000000 -0500 +@@ -1,23 +1,2 @@ + Manifest-Version: 1.0 + Main-Class: org.apache.batik.apps.slideshow.Main +-Class-Path: lib/batik-ext.jar \ +- lib/batik-dom.jar \ +- lib/batik-css.jar \ +- lib/batik-svg-dom.jar \ +- lib/batik-gvt.jar \ +- lib/batik-parser.jar \ +- lib/batik-script.jar \ +- lib/batik-bridge.jar \ +- lib/batik-swing.jar \ +- lib/batik-anim.jar \ +- lib/batik-transcoder.jar \ +- lib/batik-gui-util.jar \ +- lib/batik-awt-util.jar \ +- lib/batik-codec.jar \ +- lib/batik-util.jar \ +- lib/batik-xml.jar \ +- lib/xerces_2_5_0.jar \ +- lib/xalan-2.6.0.jar \ +- lib/xml-apis.jar \ +- lib/xml-apis-ext.jar \ +- lib/js.jar +diff -ruN batik-1.8.old/sources/batik-ttf2svg.mf batik-1.8/sources/batik-ttf2svg.mf +--- batik-1.8.old/sources/batik-ttf2svg.mf 2007-03-26 11:53:18.000000000 -0400 ++++ batik-1.8/sources/batik-ttf2svg.mf 2007-11-23 12:30:11.000000000 -0500 +@@ -1,4 +1,2 @@ + Manifest-Version: 1.0 + Main-Class: org.apache.batik.apps.ttf2svg.Main +-Class-Path: lib/batik-svggen.jar \ +- lib/batik-util.jar diff --git a/SOURCES/batik-policy.patch b/SOURCES/batik-policy.patch new file mode 100644 index 0000000..3881e00 --- /dev/null +++ b/SOURCES/batik-policy.patch @@ -0,0 +1,34 @@ +diff -uNr batik-1.8-clean/resources/org/apache/batik/apps/rasterizer/resources/rasterizer.bin.policy batik-1.8/resources/org/apache/batik/apps/rasterizer/resources/rasterizer.bin.policy +--- batik-1.8-clean/resources/org/apache/batik/apps/rasterizer/resources/rasterizer.bin.policy 2007-09-07 14:05:13.000000000 -0400 ++++ batik-1.8/resources/org/apache/batik/apps/rasterizer/resources/rasterizer.bin.policy 2007-09-12 13:36:24.000000000 -0400 +@@ -30,6 +30,11 @@ + permission java.security.AllPermission; + }; + ++//new stuff ++grant codeBase "${app.jar.base}/batik-all.jar" { ++ permission java.security.AllPermission; ++}; ++ + grant codeBase "${app.jar.base}/lib/batik-ext.jar" { + permission java.security.AllPermission; + }; +diff -uNr batik-1.8-clean/resources/org/apache/batik/apps/svgbrowser/resources/svgbrowser.bin.policy batik-1.8/resources/org/apache/batik/apps/svgbrowser/resources/svgbrowser.bin.policy +--- batik-1.8-clean/resources/org/apache/batik/apps/svgbrowser/resources/svgbrowser.bin.policy 2007-09-07 14:05:13.000000000 -0400 ++++ batik-1.8/resources/org/apache/batik/apps/svgbrowser/resources/svgbrowser.bin.policy 2007-09-12 13:36:49.000000000 -0400 +@@ -34,6 +34,10 @@ + permission java.security.AllPermission; + }; + ++grant codeBase "${app.jar.base}/batik-all.jar" { ++ permission java.security.AllPermission; ++}; ++ + grant codeBase "${app.jar.base}/lib/batik-ext.jar" { + permission java.security.AllPermission; + }; +@@ -104,4 +108,3 @@ + grant { + permission java.io.FilePermission "lib/batik-svg-dom.jar", "read"; + }; +- diff --git a/SOURCES/batik-repack.sh b/SOURCES/batik-repack.sh new file mode 100644 index 0000000..21e5c93 --- /dev/null +++ b/SOURCES/batik-repack.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +tmp=$(mktemp -d) + +trap cleanup EXIT +cleanup() { + set +e + [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp" +} + +unset CDPATH +pwd=$(pwd) +ver=1.8pre + +cd "$tmp" +unzip -qq "$pwd"/batik-src-$ver.zip +rm -rf `find -name *.jar` +zip -9 -o -r -q "$pwd"/batik-repack-$ver.zip batik-$ver +touch -r "$pwd"/batik-src-$ver.zip "$pwd"/batik-repack-$ver.zip +cd - >/dev/null diff --git a/SOURCES/batik-script-remove-js.patch b/SOURCES/batik-script-remove-js.patch new file mode 100644 index 0000000..ab3a838 --- /dev/null +++ b/SOURCES/batik-script-remove-js.patch @@ -0,0 +1,14 @@ +--- batik-script.pom 2011-05-03 12:57:35.428208738 +0200 ++++ batik-script.pom.new 2011-05-03 13:08:54.565452184 +0200 +@@ -98,11 +98,6 @@ + 1.8 + + +- org.apache.xmlgraphics +- batik-js +- 1.8 +- +- + xml-apis + xml-apis + 1.3.04 diff --git a/SOURCES/batik-squiggle.desktop b/SOURCES/batik-squiggle.desktop new file mode 100644 index 0000000..f9189cf --- /dev/null +++ b/SOURCES/batik-squiggle.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Squiggle +Comment=SVG browser +Comment[fi]=SVG-selain +Exec=squiggle +Terminal=false +Type=Application +Icon=squiggle.png +Encoding=UTF-8 +Categories=Application;Graphics;VectorGraphics;Java;X-JPackage; +MimeType=image/svg+xml; diff --git a/SOURCES/batik.rasterizer.script b/SOURCES/batik.rasterizer.script new file mode 100644 index 0000000..7eb6694 --- /dev/null +++ b/SOURCES/batik.rasterizer.script @@ -0,0 +1,35 @@ +#!/bin/sh +# +# Batik SVG Rasterizer script +# JPackage Project + +# Source functions library +if [ -f /usr/share/java-utils/java-functions ] ; then + . /usr/share/java-utils/java-functions +else + echo "Can't find functions library, aborting" + exit 1 +fi + +# Source system prefs +if [ -f /etc/rasterizer.conf ] ; then + . /etc/rasterizer.conf +fi + +# Source user prefs +if [ -f $HOME/.rasterizerrc ] ; then + . $HOME/.rasterizerrc +fi + +# Configuration +MAIN_CLASS=org.apache.batik.apps.rasterizer.Main +BASE_JARS="batik-rasterizer.jar batik-all.jar xml-commons-apis-ext.jar" + +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run "$@" diff --git a/SOURCES/batik.slideshow.script b/SOURCES/batik.slideshow.script new file mode 100644 index 0000000..33b8748 --- /dev/null +++ b/SOURCES/batik.slideshow.script @@ -0,0 +1,35 @@ +#!/bin/sh +# +# Batik SVG Slideshow script +# JPackage Project + +# Source functions library +if [ -f /usr/share/java-utils/java-functions ] ; then + . /usr/share/java-utils/java-functions +else + echo "Can't find functions library, aborting" + exit 1 +fi + +# Source system prefs +if [ -f /etc/slideshow.conf ] ; then + . /etc/slideshow.conf +fi + +# Source user prefs +if [ -f $HOME/.slideshowrc ] ; then + . $HOME/.slideshowrc +fi + +# Configuration +MAIN_CLASS=org.apache.batik.apps.slideshow.Main +BASE_JARS="batik batik-slideshow" + +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run "$@" diff --git a/SOURCES/batik.squiggle.script b/SOURCES/batik.squiggle.script new file mode 100644 index 0000000..baa96c6 --- /dev/null +++ b/SOURCES/batik.squiggle.script @@ -0,0 +1,36 @@ +#!/bin/sh +# +# Batik SVG Browser (Squiggle) script +# JPackage Project + +# Source functions library +if [ -f /usr/share/java-utils/java-functions ] ; then + . /usr/share/java-utils/java-functions +else + echo "Can't find functions library, aborting" + exit 1 +fi + +# Source system prefs +if [ -f /etc/squiggle.conf ] ; then + . /etc/squiggle.conf +fi + +# Source user prefs +if [ -f $HOME/.squigglerc ] ; then + . $HOME/.squigglerc +fi + +# Configuration +MAIN_CLASS=org.apache.batik.apps.svgbrowser.Main +BASE_JARS="batik-squiggle.jar batik-all.jar rhino.jar xml-commons-apis.jar +xml-commons-apis-ext.jar" +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + + +# Let's start +run "$@" diff --git a/SOURCES/batik.svgpp.script b/SOURCES/batik.svgpp.script new file mode 100644 index 0000000..3acd398 --- /dev/null +++ b/SOURCES/batik.svgpp.script @@ -0,0 +1,35 @@ +#!/bin/sh +# +# Batik SVG Pretty Printer script +# JPackage Project + +# Source functions library +if [ -f /usr/share/java-utils/java-functions ] ; then + . /usr/share/java-utils/java-functions +else + echo "Can't find functions library, aborting" + exit 1 +fi + +# Source system prefs +if [ -f /etc/svgpp.conf ] ; then + . /etc/svgpp.conf +fi + +# Source user prefs +if [ -f $HOME/.svgpprc ] ; then + . $HOME/.svgpprc +fi + +# Configuration +MAIN_CLASS=org.apache.batik.apps.svgpp.Main +BASE_JARS="batik batik-svgpp" + +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run "$@" diff --git a/SOURCES/batik.ttf2svg.script b/SOURCES/batik.ttf2svg.script new file mode 100644 index 0000000..1913f0f --- /dev/null +++ b/SOURCES/batik.ttf2svg.script @@ -0,0 +1,35 @@ +#!/bin/sh +# +# Batik SVG Font Converter script +# JPackage Project + +# Source functions library +if [ -f /usr/share/java-utils/java-functions ] ; then + . /usr/share/java-utils/java-functions +else + echo "Can't find functions library, aborting" + exit 1 +fi + +# Source user prefs +if [ -f /etc/ttf2svg.conf ] ; then + . /etc/ttf2svg.conf +fi + +# Allow user-defined prefs +if [ -f $HOME/.ttf2svgrc ] ; then + . $HOME/.ttf2svgrc +fi + +# Configuration +MAIN_CLASS=org.apache.batik.apps.ttf2svg.Main +BASE_JARS="batik batik-ttf2svg" + +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run "$@" diff --git a/SPECS/batik.spec b/SPECS/batik.spec new file mode 100644 index 0000000..53be738 --- /dev/null +++ b/SPECS/batik.spec @@ -0,0 +1,547 @@ +Name: batik +Version: 1.8 +Release: 0.9.svn1230816%{?dist} +Summary: Scalable Vector Graphics for Java +License: ASL 2.0 and W3C +URL: http://xml.apache.org/batik/ +Group: Applications/Multimedia +#Source0: http://apache.crihan.fr/dist/xmlgraphics/batik/batik-src-%%{version}.zip +Source0: %{name}-repack-%{version}.zip +Source1: %{name}.squiggle.script +Source2: %{name}.svgpp.script +Source3: %{name}.ttf2svg.script +Source4: %{name}.rasterizer.script +Source5: %{name}.slideshow.script +Source6: %{name}-squiggle.desktop +Source7: %{name}-repack.sh + +%global inner_version 1.8pre + +# These manifests with OSGi metadata are taken from the Eclipse Orbit +# project: http://download.eclipse.org/tools/orbit/downloads/drops/R20110523182458/ +# +# for f in `ls *.jar`; do unzip -d `basename $f .jar | sed s/_.*//` $f; done +# for f in `find -name MANIFEST.MF`; do mv $f $(echo $f | sed "s|./org.apache.||" | sed "s|/META-INF/|-|" | sed "s/\./-/g" | sed "s|MANIFEST-MF|MANIFEST.MF|"); done +# Then manually remove all lines containing MD5sums/crypto hashes. +# tar czf batik-1.6-orbit-manifests.tar.gz *.MF +# +# FIXME: move to 1.7 manifests +Source8: %{name}-1.6-orbit-manifests.tar.gz + + +Patch0: %{name}-manifests.patch +Patch1: %{name}-policy.patch +# remove dependency on bundled rhino from pom +Patch2: %{name}-script-remove-js.patch +# SMIL in Fedora has been merged into xml-commons-apis-ext like it has +# been upstream. It's easier to take the OSGi manifests from Orbit +# directly and patch this one. +# +# FIXME: move to 1.7 manifest from Eclipse Orbit project +Patch3: %{name}-1.6-nosmilInDOMSVGManifest.patch +Requires: rhino >= 1.5 + +BuildArch: noarch + +BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: jpackage-utils >= 1.5 +BuildRequires: ant +BuildRequires: subversion +BuildRequires: zip + +BuildRequires: rhino >= 1.5 +BuildRequires: jpackage-utils >= 1.5 +BuildRequires: xerces-j2 +BuildRequires: xalan-j2 +BuildRequires: xml-commons-apis >= 1.3.04 + +BuildRequires: java-javadoc >= 1:1.6.0 +BuildRequires: rhino-javadoc + +Requires: java >= 1:1.6.0 +Requires: jpackage-utils +#full support for tiff +Requires: jai-imageio-core +Requires: rhino >= 1.5 +Requires: xalan-j2 +Requires: xml-commons-apis >= 1.3.04 + + +%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 +Summary: Batik SVG browser +Group: Applications/Multimedia +Requires: %{name} = %{version}-%{release} +Requires: jpackage-utils >= 1.5, xerces-j2 >= 2.3 + +%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 +Summary: Batik SVG pretty printer +Group: Applications/Multimedia +Requires: %{name} = %{version}-%{release} +Requires: jpackage-utils >= 1.5, xerces-j2 >= 2.3 + +%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 +Summary: Batik SVG font converter +Group: Applications/Multimedia +Requires: %{name} = %{version}-%{release} +Requires: jpackage-utils >= 1.5 + +%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. + +%package rasterizer +Summary: Batik SVG rasterizer +Group: Applications/Multimedia +Requires: %{name} = %{version}-%{release} +Requires: jpackage-utils >= 1.5, xerces-j2 >= 2.3 + +%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 +Summary: Batik SVG slideshow +Group: Applications/Multimedia +Requires: %{name} = %{version}-%{release} +Requires: jpackage-utils >= 1.5, xerces-j2 >= 2.3 + +%description slideshow +Batik SVG slideshow. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation +Requires: jpackage-utils + +%description javadoc +Javadoc for %{name}. + +%package demo +Summary: Demo for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} + +%description demo +Demonstrations and samples for %{name}. + + +%prep +%setup -q -n %{name}-%{version} + +find -name '*.class' -exec rm -f '{}' \; +find -name '*.jar' -exec rm -f '{}' \; + +%patch0 -p1 +%patch1 -p1 +rm -f `find -name readOnly.png` +rm -f `find -name properties` +mkdir orbit +pushd orbit +tar xzf %{SOURCE8} +%patch3 +popd + +# create poms from templates +for module in anim awt-util bridge codec css dom ext extension gui-util \ + gvt parser script svg-dom svggen swing transcoder util xml \ + rasterizer slideshow squiggle svgpp ttf2svg; do + sed "s:@version@:%{version}:g" sources/%{name}-$module.pom.template \ + > %{name}-$module.pom +done +%patch2 + +%build +export CLASSPATH=$(build-classpath xml-commons-apis xml-commons-apis-ext js rhino xalan-j2 xalan-j2-serializer xerces-j2) +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 + +for j in $(find batik-%{version} -name *.jar); do + export CLASSPATH=$CLASSPATH:${j} +done +ant javadoc + + +%install +# inject OSGi manifests +mkdir -p META-INF +cp -p orbit/batik-bridge-MANIFEST.MF META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u %{name}-%{inner_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 %{name}-%{inner_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 %{name}-%{inner_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 %{name}-%{inner_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 %{name}-%{inner_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 %{name}-%{inner_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 %{name}-%{inner_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 %{name}-%{inner_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 %{name}-%{inner_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 %{name}-%{inner_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 %{name}-%{inner_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 %{name}-%{inner_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 %{name}-%{inner_version}/lib/batik-xml.jar META-INF/MANIFEST.MF + + +# jars +mkdir -p $RPM_BUILD_ROOT%{_javadir} +mkdir -p $RPM_BUILD_ROOT%{_javadir}/%{name} +pushd %{name}-%{inner_version}/lib +for jarname in $(find batik-*.jar); do + cp -p ${jarname} $RPM_BUILD_ROOT%{_javadir}/%{name}/ +done + +rm -fr $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-all.jar +cp -p %{name}-all.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-all.jar + +popd + +cp -p %{name}-%{inner_version}/batik-rasterizer.jar \ + %{name}-%{inner_version}/%{name}-slideshow.jar \ + %{name}-%{inner_version}/%{name}-squiggle.jar \ + %{name}-%{inner_version}/%{name}-svgpp.jar \ + %{name}-%{inner_version}/%{name}-ttf2svg.jar \ + $RPM_BUILD_ROOT%{_javadir} + +# poms and depmaps for subpackages are different (no batik subdir) +install -d -m 755 $RPM_BUILD_ROOT/%{_mavenpomdir} +for module in rasterizer slideshow squiggle svgpp ttf2svg; do + install -pm 644 %{name}-$module.pom $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}-$module.pom + %add_maven_depmap JPP-%{name}-$module.pom %{name}-$module.jar -a "%{name}:%{name}-$module" -f $module +done + +# main pom files and maven depmaps +for module in anim awt-util bridge codec css dom ext extension gui-util \ + gvt parser script svg-dom svggen swing transcoder util xml; do + + install -pm 644 %{name}-$module.pom $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-%{name}-$module.pom + %add_maven_depmap JPP.%{name}-%{name}-$module.pom %{name}/%{name}-$module.jar -a "%{name}:%{name}-$module" +done + + + + +# scripts +mkdir -p $RPM_BUILD_ROOT%{_bindir} +cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/squiggle +cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/svgpp +cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/ttf2svg +cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/rasterizer +cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}/slideshow + +# javadoc +mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} +cp -pr %{name}-%{inner_version}/docs/* \ + $RPM_BUILD_ROOT%{_javadocdir}/%{name} + +# demo +mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} +cp -pr contrib resources samples test-resources test-sources \ + $RPM_BUILD_ROOT%{_datadir}/%{name} + +#Fix perms +chmod +x $RPM_BUILD_ROOT%{_datadir}/%{name}/contrib/rasterizertask/build.sh +chmod +x $RPM_BUILD_ROOT%{_datadir}/%{name}/contrib/charts/convert.sh + + +%files -f .mfiles +%doc LICENSE NOTICE +%doc KEYS MAINTAIN README +%{_javadir}/%{name}-all.jar +%{_javadir}/batik + +%files squiggle -f .mfiles-squiggle +%attr(0755,root,root) %{_bindir}/squiggle + +%files svgpp -f .mfiles-svgpp +%attr(0755,root,root) %{_bindir}/svgpp + +%files ttf2svg -f .mfiles-ttf2svg +%attr(0755,root,root) %{_bindir}/ttf2svg + +%files rasterizer -f .mfiles-rasterizer +%attr(0755,root,root) %{_bindir}/rasterizer + +%files slideshow -f .mfiles-slideshow +%attr(0755,root,root) %{_bindir}/slideshow + +%files javadoc +%doc LICENSE NOTICE +%{_javadocdir}/%{name} + +%files demo +%{_datadir}/%{name} + + +%changelog +* Thu Nov 07 2013 Stanislav Ochotnicky - 1.8-0.9.svn1230816 +- Use add_maven_depmap instead of deprecated +- Resolves: rhbz#1027847 + +* Fri Jun 28 2013 Mikolaj Izdebski - 1.8-0.8.svn1230816 +- Remove BR: ant-nodeps + +* Fri Jun 28 2013 Mikolaj Izdebski - 1.8-0.8.svn1230816 +- Rebuild to regenerate API documentation +- Resolves: CVE-2013-1571 + +* Wed Feb 13 2013 Fedora Release Engineering - 1.8-0.7.svn1230816 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Nov 20 2012 Mikolaj Izdebski - 1.8-0.6.svn1230816 +- Remove unneeded BR: jython + +* Fri Oct 5 2012 Mikolaj Izdebski - 1.8-0.5.svn1230816 +- Fix rasterizer classpath +- Resolves: rhbz#577486 + +* Fri Aug 24 2012 Mikolaj Izdebski - 1.8-0.4.svn1230816 +- Fix license tag +- Install LICENSE and NOTICE with javadoc package +- Remove RPM bug workaround +- Update to current packaging guidelines + +* Thu Jul 19 2012 Mikolaj Izdebski - 1.8-0.3.svn1230816 +- Add BR: zip + +* Wed Jul 18 2012 Fedora Release Engineering - 1.8-0.2.svn1230816 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Feb 20 2012 Jiri Vanek 1.7-14 +- Solving jdk7's removed internal (since 1.4.2 deprecated) com.sun.image.codec package +- Gripped new sources from 1.8pre trunk which have support adapters for removed classes, +- Removed all old an unused tiff classes from it - org.apache.batik.ext.awt.image.code.tiff +- Added requires JAI which provides tiff support +- Added inner_version variable, which helps to keep 1.8 outside and 1.8pre inside + +* Thu Jan 12 2012 Fedora Release Engineering - 1.7-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Jul 8 2011 Andrew Overholt 1.7-12 +- New OSGi manifests from Eclipse Orbit. + +* Tue May 3 2011 Stanislav Ochotnicky - 1.7-11 +- Add maven metadata and pom files +- Versionless jars & javadocs + +* Mon Feb 07 2011 Fedora Release Engineering - 1.7-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Oct 25 2010 Alexander Kurtakov 1.7-9 +- Fix utilities startup scripts. + +* Fri Oct 1 2010 Alexander Kurtakov 1.7-8 +- Fix build. + +* Fri Oct 1 2010 Alexander Kurtakov 1.7-7 +- BR/R java 1.6.0 not java-openjdk. +- Cleanup build section. + +* Fri Jul 24 2009 Fedora Release Engineering - 1.7-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jul 15 2009 Lillian Angel - 1.7-5 +- Fixed javadocs issue. +- Resolves: rhbz#511767 + +* Mon Feb 23 2009 Fedora Release Engineering - 1.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Feb 6 2009 Alexander Kurtakov 1.7-3 +- Install separate jars and put OSGi manifests in them. + +* Tue Jan 06 2009 Lillian Angel - 1.7-2 +- Fixed java dependencies to check for java-1.6.0-openjdk instead. + +* Mon Jan 05 2009 Lillian Angel - 1.7-1 +- Updated batik-repack.sh to remove font files from test resources. +- Resolves: rhbz#477369 + +* Mon Jan 05 2009 Nicolas Chauvet - 1.7-1 +- Fix release field +- Repack the source (without included jar files) +- Fix dual listed files in the demo subpackage +- Fix BR subversion used in determine-svn-revision-svn-info +- Fix BR that was previously bundled within the source archive +- Resolves: rhbz#472736 + +* Fri Nov 28 2008 Lillian Angel - 1.7-0.7 +- Fixed BASE_JARS in batik.rasterizer.script. +- Resolves: rhbz#455397 + +* Mon Apr 28 2008 Lillian Angel - 1.7-0.5.beta1 +- Fixed BASE_JARS in batik-squiggle.script. +- Resolves: rhbz#444358 + +* Mon Mar 31 2008 Lillian Angel - 1.7-0.2.beta1 +- Updated sources. +- Updated release. +- Added CLASSPATH to build. +- Removed codecs patch. + +* Fri Nov 23 2007 Lillian Angel - 1.7-0.1.beta1 +- Fixed rpmlint errors. + +* Tue Sep 18 2007 Joshua Sumali - 0:1.7-1 +- Update to batik 1.7 beta1 + +* Thu Feb 22 2007 Ralph Apel - 0:1.6-3jpp +- Add gcj_support option +- Add option to avoid rhino, jython on bootstrap, omit -squiggle subpackage + +* Wed Apr 26 2006 Fernando Nasser - 0:1.6-2jpp +- First JPP 1.7 build + +* Tue Aug 2 2005 Ville Skyttä - 0:1.6-1jpp +- 1.6. +- Fix build of manual (java.awt.headless for stylebook). + +* Fri Jan 28 2005 Jason Corley - 0:1.5.1-1jpp +- Update to 1.5.1 + +* Mon Nov 22 2004 Ville Skyttä - 0:1.5-5jpp +- Drop -monolithic and obsolete it in main package. It shouldn't be needed + in the first place, and the *.policy files that end up in it will contain + wrong paths which causes all sorts of borkage. +- BuildRequire jython to get support for it built. +- Remove xml-commons-apis and xalan-j2 from scripts and install time + dependencies, require Java >= 1.4 instead (xalan-j2 is still needed at + build time). +- New style versionless javadoc dir symlinking. +- Crosslink with full J2SE javadocs. +- Associate SVG MIME type with Squiggle in freedesktop.org menu entry. + +* Fri Aug 20 2004 Ralph Apel - 0:1.5-4jpp +- Build with ant-1.6.2 + +* Mon Nov 03 2003 Paul Nasrat - 0:1.5-3jpp +- Fix non-versioned javadoc symlinks + +* Fri Aug 15 2003 Ville Skyttä - 0:1.5-2jpp +- Fix jar names in policy files, kudos to Scott Douglas-Watson. +- Add freedesktop.org menu entry for Squiggle. +- Improve subpackage descriptions. +- Save .spec in UTF-8, get rid of # ------- separators. + +* Sat Jul 19 2003 Ville Skyttä - 0:1.5-1jpp +- Update to 1.5. +- Crosslink with xml-commons-apis and rhino javadocs. + +* Thu Apr 17 2003 Ville Skyttä - 0:1.5-0.beta5.2jpp +- Rebuild to satisfy dependencies due to renamed rhino (r4 -> R4). + +* Sun Mar 30 2003 Ville Skyttä - 1.5-0.beta5.1jpp +- Update to 1.5 beta5. +- Rebuild for JPackage 1.5. +- Use bundled crimson and stylebook for building the manual. + +* Tue May 07 2002 Guillaume Rousse 1.1.1-4jpp +- vendor, distribution, group tags +- scripts use system prefs +- scripts source user prefs before configuration + +* Thu Mar 28 2002 Guillaume Rousse 1.1.1-3jpp +- libs package is now monolithic package + +* Sun Jan 27 2002 Guillaume Rousse 1.1.1-2jpp +- adaptation to new stylebook1.0b3 package + +* Mon Jan 21 2002 Guillaume Rousse 1.1.1-1jpp +- 1.1.1 +- additional sources in individual archives +- no dependencies for manual and javadoc packages +- stricter dependency for demo package +- versioned dir for javadoc +- explicitely set xalan-j2.jar and xml-commons-api.jar in classpath +- splitted applications in distinct packages + +* Wed Dec 5 2001 Guillaume Rousse 1.1-0.rc4.3jpp +- javadoc into javadoc package +- new launch scripts using functions library +- Requires jpackage-utils +- added name-slideshow.jar +- main jar renamed name.jar + +* Wed Nov 21 2001 Christian Zoffoli 1.1-0.rc4.2jpp +- fixed previous changelog +- changed extension --> jpp + +* Tue Nov 20 2001 Christian Zoffoli 1.1-0.rc4.1jpp +- rc4 + +* Sat Nov 17 2001 Christian Zoffoli 1.1-0.rc3.2jpp +- added batik-libs creation + +* Thu Nov 9 2001 Christian Zoffoli 1.1-0.rc3.1jpp +- changed version to 0.rc3.1 + +* Mon Nov 5 2001 Christian Zoffoli 1.1rc3-1jpp +- 1.1rc3 + +* Sat Oct 6 2001 Guillaume Rousse 1.0-4jpp +- first unified release +- removed xalan-j2 from classpath as it is autoloaded by stylebook-1.0b3 +- used original tarball +- s/jPackage/JPackage + +* Mon Sep 17 2001 Guillaume Rousse 1.0-3mdk +- provided *working* startup scripts + +* Sat Sep 15 2001 Guillaume Rousse 1.0-2mdk +- requires specificaly crimson +- only manual buildrequires stylebook-1.0b3 and xerces-j1 +- dropped xalan-j2 buildrequires as stylebook-1.0b3 needs it already +- changed samples package name to demo +- moved demo files to _datadir/name +- provided startup scripts + +* Thu Aug 30 2001 Guillaume Rousse 1.0-1mdk +- first Mandrake release