diff --git a/README.md b/README.md
index aaedc70..fdb1532 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,10 @@
# java-jeuclid
+JEuclid is a complete MathML rendering solution, consisting of:
+
+* A MathViewer application
+* Command line converters from MathML to other formats
+* An ant task for automated conversion
+* Display components for AWT and Swing
+* A component for Apache Cocoon
+
diff --git a/java-jeuclid-3.1.8-AppleJavaExtensions.patch b/java-jeuclid-3.1.8-AppleJavaExtensions.patch
new file mode 100644
index 0000000..0fda286
--- /dev/null
+++ b/java-jeuclid-3.1.8-AppleJavaExtensions.patch
@@ -0,0 +1,266 @@
+--- jeuclid-3.1.1.orig/jeuclid-mathviewer/src/main/java/com/apple/eawt/ApplicationAdapter.java 1970-01-01 01:00:00.000000000 +0100
++++ jeuclid-3.1.1/jeuclid-mathviewer/src/main/java/com/apple/eawt/ApplicationAdapter.java 2008-08-15 19:46:42.000000000 +0200
+@@ -0,0 +1,36 @@
++/*
++ * Sun Public License Notice
++ *
++ * The contents of this file are subject to the Sun Public License
++ * Version 1.0 (the "License"). You may not use this file except in
++ * compliance with the License. A copy of the License is available at
++ * http://www.sun.com/
++ *
++ * The Original Code is NetBeans. The Initial Developer of the Original
++ * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
++ * Microsystems, Inc. All Rights Reserved.
++ */
++
++/* this is stub code written based on Apple EAWT package javadoc
++published at
++ * http://developer.apple.com. It makes compiling code which uses Apple
++EAWT
++ * on non-Mac platforms possible. The compiled stub classes should
++never be
++ * included in the final product.
++ */
++
++package com.apple.eawt;
++
++public class ApplicationAdapter {
++ public void handleAbout(ApplicationEvent event) {}
++ public void handleOpenApplication(ApplicationEvent event) {}
++ public void handleOpenFile(ApplicationEvent event) {}
++ public void handlePreferences(ApplicationEvent event) {}
++ public void handlePrintFile(ApplicationEvent event) {}
++ public void handleQuit(ApplicationEvent event) {}
++ public void handleReOpenApplication(ApplicationEvent event) {}
++}
++
++
++
+--- jeuclid-3.1.1.orig/jeuclid-mathviewer/src/main/java/com/apple/eawt/ApplicationBeanInfo.java 1970-01-01 01:00:00.000000000 +0100
++++ jeuclid-3.1.1/jeuclid-mathviewer/src/main/java/com/apple/eawt/ApplicationBeanInfo.java 2008-08-15 19:46:42.000000000 +0200
+@@ -0,0 +1,29 @@
++/*
++ * Sun Public License Notice
++ *
++ * The contents of this file are subject to the Sun Public License
++ * Version 1.0 (the "License"). You may not use this file except in
++ * compliance with the License. A copy of the License is available at
++ * http://www.sun.com/
++ *
++ * The Original Code is NetBeans. The Initial Developer of the Original
++ * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
++ * Microsystems, Inc. All Rights Reserved.
++ */
++
++/* this is stub code written based on Apple EAWT package javadoc
++published at
++ * http://developer.apple.com. It makes compiling code which uses Apple
++EAWT
++ * on non-Mac platforms possible. The compiled stub classes should
++never be
++ * included in the final product.
++ */
++
++package com.apple.eawt;
++
++public class ApplicationBeanInfo extends java.beans.SimpleBeanInfo
++{
++ public java.awt.Image getIcon(int iconKind) { return null; }
++}
++
+--- jeuclid-3.1.1.orig/jeuclid-mathviewer/src/main/java/com/apple/eawt/ApplicationEvent.java 1970-01-01 01:00:00.000000000 +0100
++++ jeuclid-3.1.1/jeuclid-mathviewer/src/main/java/com/apple/eawt/ApplicationEvent.java 2008-08-15 19:46:42.000000000 +0200
+@@ -0,0 +1,34 @@
++/*
++ * Sun Public License Notice
++ *
++ * The contents of this file are subject to the Sun Public License
++ * Version 1.0 (the "License"). You may not use this file except in
++ * compliance with the License. A copy of the License is available at
++ * http://www.sun.com/
++ *
++ * The Original Code is NetBeans. The Initial Developer of the Original
++ * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
++ * Microsystems, Inc. All Rights Reserved.
++ */
++
++/* this is stub code written based on Apple EAWT package javadoc
++published at
++ * http://developer.apple.com. It makes compiling code which uses Apple
++EAWT
++ * on non-Mac platforms possible. The compiled stub classes should
++never be
++ * included in the final product.
++ */
++
++package com.apple.eawt;
++
++public class ApplicationEvent extends java.util.EventObject implements
++java.io.Serializable
++{
++ public ApplicationEvent(Object source) { super(source); }
++ public java.lang.String getFilename() { return null; }
++ public boolean isHandled() { return false; }
++ public void setHandled(boolean state) {}
++}
++
++
+--- jeuclid-3.1.1.orig/jeuclid-mathviewer/src/main/java/com/apple/eawt/Application.java 1970-01-01 01:00:00.000000000 +0100
++++ jeuclid-3.1.1/jeuclid-mathviewer/src/main/java/com/apple/eawt/Application.java 2008-08-15 19:46:42.000000000 +0200
+@@ -0,0 +1,45 @@
++/*
++ * Sun Public License Notice
++ *
++ * The contents of this file are subject to the Sun Public License
++ * Version 1.0 (the "License"). You may not use this file except in
++ * compliance with the License. A copy of the License is available at
++ * http://www.sun.com/
++ *
++ * The Original Code is NetBeans. The Initial Developer of the Original
++ * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
++ * Microsystems, Inc. All Rights Reserved.
++ */
++
++/* this is stub code written based on Apple EAWT package javadoc
++published at
++ * http://developer.apple.com. It makes compiling code which uses Apple
++EAWT
++ * on non-Mac platforms possible. The compiled stub classes should
++never be
++ * included in the final product.
++ */
++
++package com.apple.eawt;
++
++public class Application
++{
++ public Application() { }
++ public void addAboutMenuItem() {}
++ public void addApplicationListener(ApplicationListener listener) {}
++ public void addPreferencesMenuItem() {}
++ public static Application getApplication() { return null; }
++ public boolean getEnabledAboutMenu() { return false; }
++ public boolean getEnabledPreferencesMenu() { return false; }
++ public static java.awt.Point getMouseLocationOnScreen() { return
++null; }
++ public boolean isAboutMenuItemPresent() { return false; }
++ public boolean isPreferencesMenuItemPresent() { return false; }
++ public void removeAboutMenuItem() {}
++ public void removeApplicationListener(ApplicationListener listener)
++{}
++ public void removePreferencesMenuItem() {}
++ public void setEnabledAboutMenu(boolean enable) {}
++ public void setEnabledPreferencesMenu(boolean enable) {}
++}
++
+--- jeuclid-3.1.1.orig/jeuclid-mathviewer/src/main/java/com/apple/eawt/ApplicationListener.java 1970-01-01 01:00:00.000000000 +0100
++++ jeuclid-3.1.1/jeuclid-mathviewer/src/main/java/com/apple/eawt/ApplicationListener.java 2008-08-15 19:47:48.000000000 +0200
+@@ -0,0 +1,35 @@
++/*
++ * Sun Public License Notice
++ *
++ * The contents of this file are subject to the Sun Public License
++ * Version 1.0 (the "License"). You may not use this file except in
++ * compliance with the License. A copy of the License is available at
++ * http://www.sun.com/
++ *
++ * The Original Code is NetBeans. The Initial Developer of the Original
++ * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
++ * Microsystems, Inc. All Rights Reserved.
++ */
++
++/* this is stub code written based on Apple EAWT package javadoc
++published at
++ * http://developer.apple.com. It makes compiling code which uses Apple
++EAWT
++ * on non-Mac platforms possible. The compiled stub classes should
++never be
++ * included in the final product.
++ */
++
++package com.apple.eawt;
++
++public interface ApplicationListener extends java.util.EventListener
++{
++ public void handleAbout(ApplicationEvent event);
++ public void handleOpenApplication(ApplicationEvent event);
++ public void handleOpenFile(ApplicationEvent event);
++ public void handlePreferences(ApplicationEvent event);
++ public void handlePrintFile(ApplicationEvent event);
++ public void handleQuit(ApplicationEvent event);
++ public void handleReOpenApplication(ApplicationEvent event);
++}
++
+--- jeuclid-3.1.1.orig/jeuclid-mathviewer/src/main/java/com/apple/eawt/CocoaComponent.java 1970-01-01 01:00:00.000000000 +0100
++++ jeuclid-3.1.1/jeuclid-mathviewer/src/main/java/com/apple/eawt/CocoaComponent.java 2008-08-15 19:46:42.000000000 +0200
+@@ -0,0 +1,31 @@
++/*
++ * Sun Public License Notice
++ *
++ * The contents of this file are subject to the Sun Public License
++ * Version 1.0 (the "License"). You may not use this file except in
++ * compliance with the License. A copy of the License is available at
++ * http://www.sun.com/
++ *
++ * The Original Code is NetBeans. The Initial Developer of the Original
++ * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
++ * Microsystems, Inc. All Rights Reserved.
++ */
++
++/* this is stub code written based on Apple EAWT package javadoc published at
++ * http://developer.apple.com. It makes compiling code which uses Apple EAWT
++ * on non-Mac platforms possible.
++ */
++
++
++package com.apple.eawt;
++
++public abstract class CocoaComponent extends java.awt.Canvas
++{
++ public abstract int createNSView();
++ public long createNSViewLong() { return 0; }
++ public abstract java.awt.Dimension getMaximumSize();
++ public abstract java.awt.Dimension getMinimumSize();
++ public abstract java.awt.Dimension getPreferredSize();
++ public void sendMessage(int messageID, java.lang.Object message) {}
++}
++
+--- jeuclid-3.1.1.orig/jeuclid-mathviewer/src/main/java/com/apple/eawt/package 1970-01-01 01:00:00.000000000 +0100
++++ jeuclid-3.1.1/jeuclid-mathviewer/src/main/java/com/apple/eawt/package 2008-08-15 19:46:42.000000000 +0200
+@@ -0,0 +1,35 @@
++/*
++ * Sun Public License Notice
++ *
++ * The contents of this file are subject to the Sun Public License
++ * Version 1.0 (the "License"). You may not use this file except in
++ * compliance with the License. A copy of the License is available at
++ * http://www.sun.com/
++ *
++ * The Original Code is NetBeans. The Initial Developer of the Original
++ * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
++ * Microsystems, Inc. All Rights Reserved.
++ */
++
++/* this is stub code written based on Apple EAWT package javadoc
++published at
++ * http://developer.apple.com. It makes compiling code which uses Apple
++EAWT
++ * on non-Mac platforms possible. The compiled stub classes should
++never be
++ * included in the final product.
++ */
++
++package com.apple.eawt;
++
++public interface ApplicationListener extends java.util.EventListener
++{
++ public void handleAbout(ApplicationEvent event);
++ public void handleOpenApplication(ApplicationEvent event);
++ public void handleOpenFile(ApplicationEvent event);
++ public void handlePreferences(ApplicationEvent event);
++ public void handlePrintFile(ApplicationEvent event);
++ public void handleQuit(ApplicationEvent event);
++ public void handleReOpenApplication(ApplicationEvent event);
++}
++
diff --git a/java-jeuclid-3.1.8-build1.xml b/java-jeuclid-3.1.8-build1.xml
new file mode 100644
index 0000000..b3b126d
--- /dev/null
+++ b/java-jeuclid-3.1.8-build1.xml
@@ -0,0 +1,229 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/java-jeuclid-3.1.8-removes-OSX-dep.patch b/java-jeuclid-3.1.8-removes-OSX-dep.patch
new file mode 100644
index 0000000..d2fc68e
--- /dev/null
+++ b/java-jeuclid-3.1.8-removes-OSX-dep.patch
@@ -0,0 +1,18 @@
+--- jeuclid-mathviewer/src/main/java/net/sourceforge/jeuclid/app/mathviewer/MathViewer.java 2009-10-09 15:22:40.000000000 +0200
++++ jeuclid-mathviewer/src/main/java/net/sourceforge/jeuclid/app/mathviewer/MathViewer.java-gil 2009-11-20 14:36:18.000000000 +0100
+@@ -86,13 +86,13 @@
+ public void run() {
+ final MainFrame mainFrame = new MainFrame();
+ mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+- if (MathViewer.OSX) {
++ /*if (MathViewer.OSX) {
+ final Application a = Application.getApplication();
+ a.setEnabledAboutMenu(true);
+ a.setEnabledPreferencesMenu(true);
+ a.addApplicationListener(new MainFrameAppListener(
+ mainFrame));
+- }
++ }*/
+ if (MathViewer.source != null) {
+ mainFrame.loadFile(MathViewer.source);
+ }
diff --git a/java-jeuclid-3.1.9-cli.sh b/java-jeuclid-3.1.9-cli.sh
new file mode 100644
index 0000000..3140f29
--- /dev/null
+++ b/java-jeuclid-3.1.9-cli.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+. /usr/share/java-utils/java-functions
+
+MAIN_CLASS=net.sourceforge.jeuclid.app.Mml2xxx
+
+set_classpath "commons-logging commons-cli commons-lang24 xmlgraphics-commons batik-all commons-io jeuclid-core jeuclid-core16 jeuclid-cli"
+
+run "$@"
diff --git a/java-jeuclid-3.1.9-core16-build.xml b/java-jeuclid-3.1.9-core16-build.xml
new file mode 100644
index 0000000..aa9066e
--- /dev/null
+++ b/java-jeuclid-3.1.9-core16-build.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/java-jeuclid-3.1.9-core16-maven-build.properties b/java-jeuclid-3.1.9-core16-maven-build.properties
new file mode 100644
index 0000000..1a86e76
--- /dev/null
+++ b/java-jeuclid-3.1.9-core16-maven-build.properties
@@ -0,0 +1,21 @@
+#Generated by Maven Ant Plugin - DO NOT EDIT THIS FILE!
+#Fri Feb 26 14:48:43 CET 2010
+maven.settings.offline=false
+jeuclid.version=3.1.9
+maven.build.finalName=jeuclid-core16-${jeuclid.version}
+maven.build.resourceDir.0=src/main/resources
+maven.build.testOutputDir=${maven.build.dir}/test-classes
+maven.build.testResourceDir.0=src/test/resources
+runtime.lib=/opt/java/jdk1.6.0/jre/lib/rt.jar
+maven.reporting.outputDirectory=${maven.build.dir}/site
+project.build.sourceEncoding=UTF-8
+maven.build.srcDir.0=src/main/java
+project.build.directory=${maven.build.dir}
+maven.test.reports=${maven.build.dir}/test-reports
+maven.build.dir=target
+project.build.outputDirectory=${maven.build.outputDir}
+common.dir=${user.home}/jeuclid-core16/..
+maven.build.testDir.0=src/test/java
+maven.settings.interactiveMode=true
+maven.repo.local=${user.home}/.m2/repository
+maven.build.outputDir=${maven.build.dir}/classes
diff --git a/java-jeuclid-3.1.9-core16-maven-build.xml b/java-jeuclid-3.1.9-core16-maven-build.xml
new file mode 100644
index 0000000..e869db7
--- /dev/null
+++ b/java-jeuclid-3.1.9-core16-maven-build.xml
@@ -0,0 +1,591 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =================================== WARNING ===================================
+ JUnit is not present in your $ANT_HOME/lib directory. Tests not executed.
+ ===============================================================================
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/java-jeuclid-3.1.9-mathviewer.sh b/java-jeuclid-3.1.9-mathviewer.sh
new file mode 100644
index 0000000..5363853
--- /dev/null
+++ b/java-jeuclid-3.1.9-mathviewer.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+. /usr/share/java-utils/java-functions
+
+MAIN_CLASS=net.sourceforge.jeuclid.app.mathviewer.MathViewer
+
+set_classpath "commons-logging commons-io xmlgraphics-commons batik-all jeuclid-core jeuclid-core16 jeuclid-mathviewer"
+
+run "$@"
diff --git a/java-jeuclid.spec b/java-jeuclid.spec
new file mode 100644
index 0000000..dd17e81
--- /dev/null
+++ b/java-jeuclid.spec
@@ -0,0 +1,264 @@
+%define majver %(echo %version | cut -d. -f 1-2)
+Name: java-jeuclid
+Version: 3.1.9
+Release: 2mamba
+Summary: MathML Rendering Solution
+Group: Development/Libraries/Java
+Vendor: openmamba
+Distribution: openmamba
+Packager: gil
+URL: http://jeuclid.sourceforge.net/
+Source: http://downloads.sourceforge.net/project/jeuclid/%{majver}.x/%{version}/jeuclid-parent-%{version}-src.zip
+# http://cvs.fedoraproject.org/viewvc/rpms/jeuclid/
+# build script based on debian
+Source1: java-jeuclid-3.1.8-build1.xml
+Source2: jeuclid-mathviewer.desktop
+Source3: java-jeuclid-3.1.9-mathviewer.sh
+Source4: java-jeuclid-3.1.9-cli.sh
+#Source5: java-jeuclid-3.1.8-mathviewer_it.properties
+#Source6: maven2-2.2.0-settings.xml
+Source7: java-jeuclid-3.1.9-core16-build.xml
+Source8: java-jeuclid-3.1.9-core16-maven-build.xml
+Source9: java-jeuclid-3.1.9-core16-maven-build.properties
+# removes OSX dep
+Patch0: java-jeuclid-3.1.8-removes-OSX-dep.patch
+# compiling code that uses Apple EAWT without the lib
+Patch1: java-jeuclid-3.1.8-AppleJavaExtensions.patch
+
+License: Apache Software License 2.0
+BuildRequires: apache-ant
+BuildRequires: apache-batik = 1.7
+BuildRequires: apache-fop == 0.95
+BuildRequires: apache-log4j
+BuildRequires: hicolor-icon-theme
+BuildRequires: jakarta-commons-io
+BuildRequires: jakarta-commons-lang24
+BuildRequires: jakarta-commons-logging
+#BuildRequires: jakarta-commons-logging-javadoc
+BuildRequires: java-cip-annotations
+#BuildRequires: java-cip-annotations-javadoc
+BuildRequires: java-testng
+#BuildRequires: java-testng-javadoc
+BuildRequires: java-junit3
+#BuildRequires: sun-java-javadoc
+# xml-apis xml-apis-ext
+BuildRequires: xml-commons-apis
+BuildRequires: xmlgraphics-commons == 1.3.1
+Requires: apache-batik = 1.7
+Requires: jakarta-commons-logging
+Requires: java-cip-annotations
+Requires: jpackage-utils
+Requires: xmlgraphics-commons == 1.3.1
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
+%description
+JEuclid is a complete MathML rendering solution, consisting of:
+
+* A MathViewer application
+* Command line converters from MathML to other formats
+* An ant task for automated conversion
+* Display components for AWT and Swing
+* A component for Apache Cocoon
+
+%package cli
+Group: Applications/Publishing
+Summary: JEuclid Command line interface
+Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
+Requires: jakarta-commons-cli
+Requires: jakarta-commons-io
+Requires: jakarta-commons-lang24
+
+%description cli
+The %{name}-cli package provides a command line interface for %{name}.
+
+%package fop
+Group: Applications/Publishing
+Summary: JEuclid plug-in for FOP
+Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
+Requires: apache-fop == 0.95
+
+%description fop
+The %{name}-fop package is a jeuclid plug-in for Apache FOP.
+
+%package mathviewer
+Group: Applications/Publishing
+Summary: Viewer for MathML files
+Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
+Requires: hicolor-icon-theme
+
+%description mathviewer
+The %{name}-mathviewer package contains the Swing MathViewer application.
+
+%prep
+
+%setup -q -n jeuclid-parent-%{version}
+
+chmod -R go=u-w *
+
+cp %{SOURCE1} build.xml
+cp %{SOURCE7} jeuclid-core16/build.xml
+cp %{SOURCE8} jeuclid-core16/maven-build.xml
+cp %{SOURCE9} jeuclid-core16/maven-build.properties
+
+#cp %{SOURCE5} jeuclid-mathviewer/src/main/resources/intl/mathviewer_it.properties
+%patch0 -p0
+%patch1 -p1
+
+# removes the FreeHep support
+rm -f jeuclid-core/src/main/java/net/sourceforge/jeuclid/converter/FreeHep*;
+
+sed 's/\r//' NOTICE > NOTICE.tmp
+touch -r NOTICE NOTICE.tmp;
+mv NOTICE.tmp NOTICE
+
+
+for j in $(find . -name "*.jar" -o -name "*.class" ); do
+ rm -f $j
+done
+
+mkdir -p lib
+pushd lib
+# jeuclid-core
+ ln -sf $(build-classpath ant-1.7.1) ant.jar
+ ln -sf $(build-classpath batik-all) batik-all.jar
+# commons-logging.jar
+ ln -sf $(build-classpath jcip-annotations) jcip-annotations.jar
+ ln -sf $(build-classpath xml-commons-apis) xml-apis.jar
+# xml-apis-ext.jar
+# xmlgraphics-commons.jar
+
+# jeuclid-cli
+ ln -sf $(build-classpath commons-cli) commons-cli.jar
+ ln -sf $(build-classpath commons-lang24) commons-lang.jar
+# jeuclid-core.jar
+# xmlgraphics-commons.jar
+
+# jeuclid-mathviewer
+# AppleJavaExtensions.jar
+ ln -sf $(build-classpath commons-logging) commons-logging.jar
+# jeuclid-core.jar
+
+# jeuclid-fop
+# batik-all.jar
+# commons-logging.jar
+ ln -sf $(build-classpath fop) fop.jar
+ ln -sf $(build-classpath fop-hyph) fop-hyph.jar
+# jeuclid-core.jar
+# xml-apis.jar
+ ln -sf $(build-classpath xml-commons-apis-ext) xml-apis-ext.jar
+ ln -sf $(build-classpath xmlgraphics-commons) xmlgraphics-commons.jar
+popd
+
+%build
+
+export JAVA_HOME=/usr/lib/jvm/jdk-sun
+ant compile-core compile-mathviewer compile-cli compile-fop -verbose
+
+cd jeuclid-core16
+export CLASSPATH=""
+CLASSPATH=$CLASSPATH:$(build-classpath batik-all commons-logging commons-io):$JAVA_HOME/jre/lib/rt.jar
+CLASSPATH=$CLASSPATH:$(build-classpath xml-commons-apis xml-commons-apis-ext xmlgraphics-commons)
+CLASSPATH=$CLASSPATH:../target/jeuclid-core.jar
+CLASSPATH=$CLASSPATH:$(build-classpath junit-3.8.2 testng-jdk15):target/classes:target/test-classes
+ant \
+ -Duser.home=$PWD \
+ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
+ -Dmaven.settings.offline=true \
+ -Dmaven.settings.interactiveMode=false \
+ -Dbuild.sysclasspath=first \
+ -Dmaven.test.skip=true \
+ jar
+
+%install
+[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
+
+mkdir -p %{buildroot}%{_javadir}
+install -pm 644 target/jeuclid-core.jar \
+ %{buildroot}%{_javadir}/jeuclid-core-%{version}.jar
+install -pm 644 jeuclid-core16/target/jeuclid-core16-%{version}.jar \
+ %{buildroot}%{_javadir}/jeuclid-core16-%{version}.jar
+install -pm 644 target/jeuclid-fop.jar \
+ %{buildroot}%{_javadir}/jeuclid-fop-%{version}.jar
+install -pm 644 target/jeuclid-mathviewer.jar \
+ %{buildroot}%{_javadir}/jeuclid-mathviewer-%{version}.jar
+install -pm 644 target/jeuclid-cli.jar \
+ %{buildroot}%{_javadir}/jeuclid-cli-%{version}.jar
+
+(
+ cd %{buildroot}%{_javadir}
+ for jar in *-%{version}*; do
+ ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
+ done
+)
+
+
+mkdir -p %{buildroot}%{_datadir}/applications
+desktop-file-install %{SOURCE2} --mode=644 --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/jeuclid-mathviewer.desktop
+
+mkdir -p %{buildroot}%{_bindir}
+install -pm 755 %{SOURCE3} %{buildroot}%{_bindir}/jeuclid-mathviewer
+install -pm 755 %{SOURCE4} %{buildroot}%{_bindir}/jeuclid-cli
+
+for png in 48x48 256x256 512x512; do
+ mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${png}/apps/
+ install -pm 644 src/icons/jeuclid_${png}.png \
+ %{buildroot}%{_datadir}/icons/hicolor/${png}/apps/jeuclid.png
+done
+mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
+install -pm 644 src/icons/jeuclid.svg \
+ %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
+%clean
+[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
+
+%post mathviewer
+%{_bindir}/update-desktop-database -q %{_datadir}/applications
+touch --no-create %{_datadir}/icons/hicolor
+
+%postun mathviewer
+if [ $1 -eq 0 ]; then
+ touch --no-create %{_datadir}/icons/hicolor
+ %{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+fi
+
+%posttrans mathviewer
+%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+
+%files
+%defattr(-,root,root)
+%{_javadir}/jeuclid-core-%{version}.jar
+%{_javadir}/jeuclid-core.jar
+%{_javadir}/jeuclid-core16-%{version}.jar
+%{_javadir}/jeuclid-core16.jar
+%doc LICENSE.txt NOTICE README.*
+
+%files cli
+%defattr(-,root,root)
+%{_bindir}/jeuclid-cli
+%{_javadir}/jeuclid-cli-%{version}.jar
+%{_javadir}/jeuclid-cli.jar
+
+%files fop
+%defattr(-,root,root)
+%{_javadir}/jeuclid-fop-%{version}.jar
+%{_javadir}/jeuclid-fop.jar
+
+%files mathviewer
+%defattr(-,root,root)
+%{_bindir}/jeuclid-mathviewer
+%{_javadir}/jeuclid-mathviewer-%{version}.jar
+%{_javadir}/jeuclid-mathviewer.jar
+%{_datadir}/applications/jeuclid-mathviewer.desktop
+%{_datadir}/icons/hicolor/*x*/apps/jeuclid.png
+%{_datadir}/icons/hicolor/scalable/apps/jeuclid.svg
+
+%changelog
+* Thu Dec 09 2010 gil 3.1.9-2mamba
+- rebuilt devel
+
+* Fri Feb 26 2010 gil 3.1.9-1mamba
+- update to 3.1.9
+- edit spec file added jeuclid-core16 jars
+
+* Fri Nov 20 2009 gil 3.1.8-1mamba
+- package created by autospec
+- added Italian translation
\ No newline at end of file
diff --git a/jeuclid-mathviewer.desktop b/jeuclid-mathviewer.desktop
new file mode 100644
index 0000000..9256772
--- /dev/null
+++ b/jeuclid-mathviewer.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Jeuclid MathViewer
+GenericName=Jeuclid MathViewer
+Comment=View MathML files
+Exec=jeuclid-mathviewer
+Icon=jeuclid
+Terminal=false
+Type=Application
+Categories=Graphics;Math;Education;Science;