rpms/mars-sim/EL-5 import.log, NONE, 1.1 mars-sim, NONE, 1.1 mars-sim-2.84-java15.patch, NONE, 1.1 mars-sim-2.84-jfreegraph.patch, NONE, 1.1 mars-sim-2.84-manifest.patch, NONE, 1.1 mars-sim-2.84-paths.patch, NONE, 1.1 mars-sim-strip.sh, NONE, 1.1 mars-sim.desktop, NONE, 1.1 mars-sim.png, NONE, 1.1 mars-sim.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Lubomir Rintel (lkundrak)
fedora-extras-commits at redhat.com
Sun Aug 10 07:43:00 UTC 2008
- Previous message (by thread): rpms/node/F-8 node-0.3.2-conf.patch, NONE, 1.1 node-0.3.2-install.patch, NONE, 1.1 node-0.3.2-rose.patch, NONE, 1.1 node.spec, NONE, 1.1 node.xinetd, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/mars-sim/devel import.log, NONE, 1.1 mars-sim, NONE, 1.1 mars-sim-2.84-java15.patch, NONE, 1.1 mars-sim-2.84-jfreegraph.patch, NONE, 1.1 mars-sim-2.84-manifest.patch, NONE, 1.1 mars-sim-2.84-paths.patch, NONE, 1.1 mars-sim-strip.sh, NONE, 1.1 mars-sim.desktop, NONE, 1.1 mars-sim.png, NONE, 1.1 mars-sim.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: lkundrak
Update of /cvs/pkgs/rpms/mars-sim/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9862/EL-5
Modified Files:
.cvsignore sources
Added Files:
import.log mars-sim mars-sim-2.84-java15.patch
mars-sim-2.84-jfreegraph.patch mars-sim-2.84-manifest.patch
mars-sim-2.84-paths.patch mars-sim-strip.sh mars-sim.desktop
mars-sim.png mars-sim.spec
Log Message:
Initial import
--- NEW FILE import.log ---
mars-sim-2_84-2_el5:EL-5:mars-sim-2.84-2.el5.src.rpm:1218353611
--- NEW FILE mars-sim ---
#!/bin/bash
#
# Mars Simulation Project script
# Lubomir Rintel (Fedora Astronomy) <lkundrak at fedoraproject.org>
# 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
# Load system-wide configuration
if [ -f /etc/mars-sim.conf ]; then
. /etc/mars-sim.conf
fi
# Load user configuration
if [ -f "$HOME/.mars-simrc" ]; then
. "$HOME/.mars-simrc"
fi
# Rest of the configuration
MAIN_CLASS=org.mars_sim.msp.MarsProject
# MSP itself
BASE_JARS="$BASE_JARS mars-sim/msp-simulation.jar"
BASE_JARS="$BASE_JARS mars-sim/map_data.jar"
BASE_JARS="$BASE_JARS mars-sim/msp-standard-ui.jar"
BASE_JARS="$BASE_JARS mars-sim/MarsProject.jar"
# Dependencies
BASE_JARS="$BASE_JARS commons-collections"
BASE_JARS="$BASE_JARS plexus-graph"
BASE_JARS="$BASE_JARS jfreechart"
BASE_JARS="$BASE_JARS log4j"
BASE_JARS="$BASE_JARS xerces-j2"
# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS $OPENGROK_OPTS
CLASSPATH="/usr/share/java/mars-sim:$CLASSPATH"
if [ \! -d "$HOME/.mars-sim/conf" ] || [ \! -d "$HOME/.mars-sim/saved" ]
then
mkdir -p "$HOME/.mars-sim"
cp -rp /usr/share/mars-sim/{conf,saved} "$HOME/.mars-sim"
fi
# Let's start
cd "$HOME/.mars-sim"
run "$@"
mars-sim-2.84-java15.patch:
--- NEW FILE mars-sim-2.84-java15.patch ---
Let GCJ know we use 1.5 language facilities.
Lubomir Rintel <lkundrak at v3.sk>
diff -urp mars-sim.orig/scripts/build.xml mars-sim/scripts/build.xml
--- mars-sim.orig/scripts/build.xml 2008-07-24 07:11:53.000000000 +0200
+++ mars-sim/scripts/build.xml 2008-07-24 07:12:06.000000000 +0200
@@ -48,7 +48,7 @@
<!-- Compile simulation classes. -->
<target name="compile-sim" depends="init">
- <javac srcdir="${mars.src}" destdir="${mars.class}">
+ <javac srcdir="${mars.src}" destdir="${mars.class}" source="1.5">
<include name="org/mars_sim/msp/simulation/**/*.java" />
<classpath>
<!--
@@ -72,7 +72,7 @@
<!-- Compile user interface classes. -->
<target name="compile-ui" depends="compile-sim">
- <javac srcdir="${mars.src}" destdir="${mars.class}">
+ <javac srcdir="${mars.src}" destdir="${mars.class}" source="1.5">
<include name="org/mars_sim/msp/ui/standard/**/*.java" />
<classpath>
<!--
@@ -99,7 +99,7 @@
<!-- Compile main project class. -->
<target name="compile-main" depends="compile-sim, compile-ui">
- <javac srcdir="${mars.src}" destdir="${mars.class}">
+ <javac srcdir="${mars.src}" destdir="${mars.class}" source="1.5">
<include name="org/mars_sim/msp/*.java" />
</javac>
</target>
@@ -213,4 +213,4 @@
</target>
-</project>
\ No newline at end of file
+</project>
mars-sim-2.84-jfreegraph.patch:
--- NEW FILE mars-sim-2.84-jfreegraph.patch ---
jfreechart-1.0.10 changed api a bit. Besides changing placement of certain
methods in hierarchy, a few functions disappeared and some abstract got added.
Beware that below I either comment them out, or implement with a lame duck
replacements, which is most likely not a right thing to do.
Lubomir Rintel (Fedora Astronomy) <lkundrak at fedoraprojecr.org>
diff -urp mars-sim.orig/org/mars_sim/msp/ui/standard/tool/monitor/BarChartTab.java mars-sim/org/mars_sim/msp/ui/standard/tool/monitor/BarChartTab.java
--- mars-sim.orig/org/mars_sim/msp/ui/standard/tool/monitor/BarChartTab.java 2008-04-09 01:15:00.000000000 +0200
+++ mars-sim/org/mars_sim/msp/ui/standard/tool/monitor/BarChartTab.java 2008-07-19 21:28:35.000000000 +0200
@@ -18,14 +18,15 @@ import javax.swing.event.TableModelEvent
import java.awt.Dimension;
import java.util.ArrayList;
import java.util.List;
-import org.jfree.data.AbstractSeriesDataset;
-import org.jfree.data.CategoryDataset;
+import org.jfree.data.general.AbstractSeriesDataset;
+import org.jfree.data.category.CategoryDataset;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.plot.*;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.CategoryLabelPosition;
+import org.jfree.chart.axis.CategoryLabelWidthType;
/**
*/
@@ -51,6 +52,10 @@ class BarChartTab extends MonitorTab {
private int[] columns;
private List<String> categories;
+ public java.lang.Comparable getSeriesKey(int unused) {
+ return new Boolean ("false");
+ }
+
public TableBarDataset(TableModel model, int columns[]) {
setModel(model);
setColumns(columns);
@@ -262,8 +267,8 @@ class BarChartTab extends MonitorTab {
CategoryAxis hAxis = ((CategoryPlot) plot).getDomainAxis();
CategoryLabelPosition defaultPos = new CategoryLabelPosition();
CategoryLabelPosition verticalPosition = new CategoryLabelPosition(defaultPos.getCategoryAnchor(),
- defaultPos.getLabelAnchor(), defaultPos.getRotationAnchor(), (3D * Math.PI / 2D));
- hAxis.setBottomCategoryLabelPosition(verticalPosition);
+ defaultPos.getLabelAnchor(), defaultPos.getRotationAnchor(), (3D * Math.PI / 2D), CategoryLabelWidthType.RANGE, (float)0);
+ //hAxis.setBottomCategoryLabelPosition(verticalPosition);
// Estimate the width of the chart by multipling the categories by the
// number of series. First calculate the column width as this is
diff -urp mars-sim.orig/org/mars_sim/msp/ui/standard/tool/monitor/PieChartTab.java mars-sim/org/mars_sim/msp/ui/standard/tool/monitor/PieChartTab.java
--- mars-sim.orig/org/mars_sim/msp/ui/standard/tool/monitor/PieChartTab.java 2008-04-09 01:15:00.000000000 +0200
+++ mars-sim/org/mars_sim/msp/ui/standard/tool/monitor/PieChartTab.java 2008-07-19 21:25:56.000000000 +0200
@@ -21,8 +21,8 @@ import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.plot.PiePlot;
-import org.jfree.data.AbstractDataset;
-import org.jfree.data.PieDataset;
+import org.jfree.data.general.AbstractDataset;
+import org.jfree.data.general.PieDataset;
/**
* This class presents a Pie chart as a Monitor tab. The data for the Pie
@@ -251,8 +251,8 @@ class PieChartTab extends MonitorTab {
// then customise it a little...
PiePlot plot = (PiePlot)chart.getPlot();
plot.setCircular(false);
- plot.setRadius(0.60);
- plot.setSectionLabelType(PiePlot.PERCENT_LABELS);
+ //plot.setRadius(0.60);
+ //plot.setSectionLabelType(PiePlot.PERCENT_LABELS);
pieModel.addChangeListener(plot);
chartpanel = new ChartPanel(chart, true);
mars-sim-2.84-manifest.patch:
--- NEW FILE mars-sim-2.84-manifest.patch ---
Default classpath is evil. We do construct our one in the startup script.
Lubomir Rintel (Fedora Astronomy) <lkundrak at fedoraprojecr.org>
diff -urp mars-sim.orig/scripts/main-manifest.txt mars-sim/scripts/main-manifest.txt
--- mars-sim.orig/scripts/main-manifest.txt 2008-02-08 15:29:24.000000000 +0100
+++ mars-sim/scripts/main-manifest.txt 2008-07-19 22:31:09.000000000 +0200
@@ -1,3 +1,2 @@
Manifest-Version: 1.0
Main-Class: org.mars_sim.msp.MarsProject
-Class-Path: jars/msp-standard-ui.jar jars/msp-simulation.jar jars/map_data.jar jars/jcommon.jar jars/jfreechart.jar jars/junit.jar jars/plexus-core.jar jars/commons-collections-3.1.jar jars/log4j-1.2.8.jar jars/vorbisspi1.0.2.jar jars/tritonus_share.jar jars/mp3sp.1.6.zip jars/jorbis-0.0.15.jar jars/jogg-0.0.7.jar jars/jl1.0.zip ./
mars-sim-2.84-paths.patch:
--- NEW FILE mars-sim-2.84-paths.patch ---
Replace paths with ones in %_javadir and and FHS compliant ones.
Saintize the classpaths. The xerces-j2 and use of its XMLSerializer
is not strictly needed with OpenJDK, but eliminates an annoying
warning.
Lubomir Rintel (Fedora Astronomy) <lkundrak at fedoraproject.org>
diff -urp mars-sim.orig/org/mars_sim/msp/simulation/mars/RandomMineralMap.java mars-sim/org/mars_sim/msp/simulation/mars/RandomMineralMap.java
--- mars-sim.orig/org/mars_sim/msp/simulation/mars/RandomMineralMap.java 2008-04-17 19:29:10.000000000 +0200
+++ mars-sim/org/mars_sim/msp/simulation/mars/RandomMineralMap.java 2008-07-26 10:03:47.000000000 +0200
@@ -149,7 +149,16 @@ public class RandomMineralMap implements
private Set<Coordinates> getTopoRegionSet(String imageMapName) {
Set<Coordinates> result = new HashSet<Coordinates>(3000);
- URL imageMapURL = ClassLoader.getSystemResource("images/" + imageMapName);
+ //URL imageMapURL = ClassLoader.getSystemResource("images/" + imageMapName);
+ URL imageMapURL;
+ try {
+ imageMapURL = new URL ("file:///usr/share/mars-sim/images/" + imageMapName);
+ } catch (java.net.MalformedURLException e) {
+ // This can not possibly happen
+ e.printStackTrace();
+ System.exit(1);
+ return result;
+ }
ImageIcon mapIcon = new ImageIcon(imageMapURL);
Image mapImage = mapIcon.getImage();
int[] mapPixels = new int[300 * 150];
diff -urp mars-sim.orig/org/mars_sim/msp/ui/standard/ImageLoader.java mars-sim/org/mars_sim/msp/ui/standard/ImageLoader.java
--- mars-sim.orig/org/mars_sim/msp/ui/standard/ImageLoader.java 2008-02-29 18:04:50.000000000 +0100
+++ mars-sim/org/mars_sim/msp/ui/standard/ImageLoader.java 2008-07-26 10:03:47.000000000 +0200
@@ -48,7 +48,16 @@ public class ImageLoader {
ImageIcon found = iconCache.get(name);
if (found == null) {
String fileName = IMAGE_DIR + name + ".gif";
- URL resource = ClassLoader.getSystemResource(fileName);
+ //URL resource = ClassLoader.getSystemResource(fileName);
+ URL resource;
+ try {
+ resource = new URL ("file:///usr/share/mars-sim/" + fileName);
+ } catch (java.net.MalformedURLException e) {
+ // This can not possibly happen
+ e.printStackTrace();
+ System.exit(1);
+ return found;
+ }
found = new ImageIcon(resource);
@@ -72,11 +81,20 @@ public class ImageLoader {
if (usedToolkit == null) {
usedToolkit = Toolkit.getDefaultToolkit();
}
- URL imageURL = ClassLoader.getSystemResource(IMAGE_DIR + imagename);
+ //URL imageURL = ClassLoader.getSystemResource(IMAGE_DIR + imagename);
+ URL imageURL;
+ try {
+ imageURL = new URL ("file:///usr/share/mars-sim/" + IMAGE_DIR + imagename);
+ } catch (java.net.MalformedURLException e) {
+ // This can not possibly happen
+ e.printStackTrace();
+ System.exit(1);
+ return newImage;
+ }
newImage = usedToolkit.createImage(imageURL);
imageCache.put(imagename, newImage);
}
return newImage;
}
-}
\ No newline at end of file
+}
diff -urp mars-sim.orig/org/mars_sim/msp/ui/standard/sound/SoundConstants.java mars-sim/org/mars_sim/msp/ui/standard/sound/SoundConstants.java
--- mars-sim.orig/org/mars_sim/msp/ui/standard/sound/SoundConstants.java 2008-06-25 06:26:52.000000000 +0200
+++ mars-sim/org/mars_sim/msp/ui/standard/sound/SoundConstants.java 2008-07-26 10:03:47.000000000 +0200
@@ -12,7 +12,7 @@ package org.mars_sim.msp.ui.standard.sou
public interface SoundConstants {
// The root path for sounds.
- public final static String SOUNDS_ROOT_PATH = "sounds/";
+ public final static String SOUNDS_ROOT_PATH = "/usr/share/mars-sim/sounds/";
// Unit window sounds for rovers.
public final static String SND_ROVER_MOVING = "rover_moving.wav";
diff -urp mars-sim.orig/org/mars_sim/msp/ui/standard/tool/about/AboutWindow.java mars-sim/org/mars_sim/msp/ui/standard/tool/about/AboutWindow.java
--- mars-sim.orig/org/mars_sim/msp/ui/standard/tool/about/AboutWindow.java 2008-06-24 20:33:28.000000000 +0200
+++ mars-sim/org/mars_sim/msp/ui/standard/tool/about/AboutWindow.java 2008-07-26 10:03:47.000000000 +0200
@@ -37,7 +37,8 @@ public class AboutWindow extends ToolWin
// Data members
private JViewport viewPort; // The view port for the text pane
private HTMLContentPane editorPane; // our HTML content pane
- private URL guideURL = AboutWindow.class.getResource("../../../../../../../docs/help/about.html");
+ //private URL guideURL = AboutWindow.class.getResource("../../../../../../../docs/help/about.html");
+ private URL guideURL;
/** Constructs a TableWindow object
* @param desktop the desktop pane
@@ -48,6 +49,14 @@ public class AboutWindow extends ToolWin
super(NAME, desktop);
+ try {
+ guideURL = new URL ("file:///usr/share/mars-sim/help/about.html");
+ } catch (java.net.MalformedURLException e) {
+ // This can not possibly happen
+ e.printStackTrace();
+ return;
+ }
+
// Create the main panel
JPanel mainPane = new JPanel(new BorderLayout());
mainPane.setBorder(new EmptyBorder(5, 5, 5, 5));
@@ -103,4 +112,4 @@ public class AboutWindow extends ToolWin
*/
public void destroy() {
}
-}
\ No newline at end of file
+}
diff -urp mars-sim.orig/org/mars_sim/msp/ui/standard/tool/guide/GuideWindow.java mars-sim/org/mars_sim/msp/ui/standard/tool/guide/GuideWindow.java
--- mars-sim.orig/org/mars_sim/msp/ui/standard/tool/guide/GuideWindow.java 2008-06-24 20:34:48.000000000 +0200
+++ mars-sim/org/mars_sim/msp/ui/standard/tool/guide/GuideWindow.java 2008-07-26 10:03:47.000000000 +0200
@@ -43,7 +43,8 @@ public class GuideWindow extends ToolWin
// Data members
private JViewport viewPort; // The view port for the text pane
private HTMLContentPane htmlPane; // our HTML content pane
- private URL guideURL = GuideWindow.class.getResource("../../../../../../../docs/help/userguide.html");
+ //private URL guideURL = GuideWindow.class.getResource("../../../../../../../docs/help/userguide.html");
+ private URL guideURL;
private JButton homeButton = new JButton ("Home");
private JButton backButton = new JButton ("Back");
private JButton forwardButton = new JButton ("Forward");
@@ -57,6 +58,14 @@ public class GuideWindow extends ToolWin
// Use TableWindow constructor
super(NAME, desktop);
+ try {
+ guideURL = new URL ("file:///usr/share/mars-sim/help/userguide.html");
+ } catch (java.net.MalformedURLException e) {
+ // This can not possibly happen
+ e.printStackTrace();
+ System.exit(1);
+ return;
+ }
// Create the main panel
JPanel mainPane = new JPanel(new BorderLayout());
diff -urp mars-sim.orig/org/mars_sim/msp/ui/standard/UIConfig.java mars-sim/org/mars_sim/msp/ui/standard/UIConfig.java
--- mars-sim.orig/org/mars_sim/msp/ui/standard/UIConfig.java 2008-02-17 12:39:36.000000000 +0100
+++ mars-sim/org/mars_sim/msp/ui/standard/UIConfig.java 2008-07-26 10:03:47.000000000 +0200
@@ -33,7 +33,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
-import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
+import org.apache.xml.serialize.XMLSerializer;
public class UIConfig {
diff -urp mars-sim.orig/scripts/build.xml mars-sim/scripts/build.xml
--- mars-sim.orig/scripts/build.xml 2008-04-09 09:20:38.000000000 +0200
+++ mars-sim/scripts/build.xml 2008-07-26 10:03:47.000000000 +0200
@@ -51,12 +51,21 @@
<javac srcdir="${mars.src}" destdir="${mars.class}">
<include name="org/mars_sim/msp/simulation/**/*.java" />
<classpath>
+<!--
<fileset dir="${mars.jars}">
<include name="junit.jar" />
<include name="plexus-core.jar" />
<include name="commons-collections-3.1.jar" />
<include name="log4j-1.2.8.jar" />
</fileset>
+-->
+ <fileset dir="/usr/share/java">
+ <include name="plexus-graph.jar" />
+ <include name="commons-collections.jar" />
+ <include name="log4j.jar" />
+ <include name="junit.jar" />
+ <include name="xerces-j2.jar" />
+ </fileset>
</classpath>
</javac>
</target>
@@ -66,6 +75,7 @@
<javac srcdir="${mars.src}" destdir="${mars.class}">
<include name="org/mars_sim/msp/ui/standard/**/*.java" />
<classpath>
+<!--
<fileset dir="${mars.jars}">
<include name="jcommon.jar" />
<include name="jfreechart.jar" />
@@ -76,6 +86,13 @@
<include name="jorbis-0.0.15.jar" />
<include name="vorbisspi1.0.2.jar" />
</fileset>
+-->
+ <fileset dir="/usr/share/java">
+ <include name="jfreechart.jar" />
+ <include name="jcommon.jar" />
+ <include name="xerces-j2.jar" />
+ <include name="plexus-graph.jar" />
+ </fileset>
</classpath>
</javac>
</target>
@@ -166,6 +183,7 @@
windowtitle="Mars Simulation Project v 2.84 API Specification"
doctitle="Mars Simulation Project v 2.84 <br>API Specification">
<classpath>
+<!--
<fileset dir="${mars.jars}">
<include name="jcommon.jar" />
<include name="jfreechart.jar" />
@@ -180,6 +198,16 @@
<include name="jorbis-0.0.15.jar" />
<include name="vorbisspi1.0.2.jar" />
</fileset>
+-->
+ <fileset dir="/usr/share/java">
+ <include name="jfreechart.jar" />
+ <include name="jcommon.jar" />
+ <include name="plexus-graph.jar" />
+ <include name="commons-collections.jar" />
+ <include name="log4j.jar" />
+ <include name="junit.jar" />
+ <include name="xerces-j2.jar" />
+ </fileset>
</classpath>
</javadoc>
--- NEW FILE mars-sim-strip.sh ---
#!/bin/sh
# Call this: mars-sim-convert.sh MarsProject_2.84.tar.gz,
# and you'll find the resulting tarball in MarsProject_2.84-fedora.tar.gz
#
# This strips the binaries of MP3 player, which is patent encumbered
# it's not used anyways
#
# Lubomir Rintel (Fedora Astronomy) <lkundrak at fedoraproject.org>
set -e
ORIGINAL=$1
[ -n "$ORIGINAL" ] # Assert that we got an argument
RESULT=$(echo $ORIGINAL |sed 's/\(\.tar\.gz\)$/-fedora\1/')
TMPDIR=$(mktemp -d /tmp/mars-sim-convert.XXXXXX)
tar xzf $ORIGINAL -C $TMPDIR
find $TMPDIR \( -name jl1.0.zip -o -name mp3sp.1.6.zip \) -exec rm '{}' \;
tar czf $RESULT -C $TMPDIR $(ls $TMPDIR)
--- NEW FILE mars-sim.desktop ---
[Desktop Entry]
Name=Mars Simulation
Comment=Simulation of human settlement on Mars
GenericName=Mars Simulation Project
Exec=mars-sim
Icon=mars-sim
Type=Application
Categories=Education;Game;Astronomy;Science;
--- NEW FILE mars-sim.spec ---
Name: mars-sim
Version: 2.84
Release: 2%{?dist}
Summary: Mars Simulation Project
Group: Amusements/Games
License: GPLv2+
URL: http://mars-sim.sourceforge.net/
# The upstream tarball contains (useless) MPEG decoder binaries:
# http://download.sourceforge.net/mars-sim/MarsProject_%{version}.tar.gz
# Download the above tarball and strip it as follows:
# sh mars-sim-strip.sh MarsProject_2.84.tar.gz
Source0: MarsProject_2.84-fedora.tar.gz
Source1: mars-sim-strip.sh
Source2: mars-sim
Source3: mars-sim.png
Source4: mars-sim.desktop
Patch0: mars-sim-2.84-jfreegraph.patch
Patch1: mars-sim-2.84-manifest.patch
Patch2: mars-sim-2.84-paths.patch
Patch3: mars-sim-2.84-java15.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: log4j commons-collections jfreechart jcommon plexus-graph java >= 1.5 jpackage-utils
BuildRequires: %{requires} ant ant-junit java-devel >= 1.5 xerces-j2 >= 1.5 desktop-file-utils
# This currently can not be built with gcj due to various missing features
BuildConflicts: java-devel-gcj
# ^^^ Tamto je nam platne ako hadovi sandale, mock na to aj tak kasle:
BuildRequires: java-devel-openjdk >= 1.5
BuildArch: noarch
%description
The Mars Simulation Project is a free software Java project to create a
simulation of future human settlement of Mars.
The simulation is a multi-agent artificial society set in a detailed
virtual world.
%package javadoc
Summary: Javadocs for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n %{name}
%patch0 -p1 -b .jfreegraph
%patch1 -p1 -b .manifest
%patch2 -p1 -b .paths
%patch3 -p1 -b .java15
# This is so that I can tap enter on a jar in mc to see manifest :)
find . -type f |xargs chmod -x
%build
# Remove prebuilt stuff -- map jar is not built
find \( -name '*.jar' -o -name '*.zip' \) \
\! -name 'map_data.jar' -exec rm -f '{}' \;
# Encodings
for F in docs/*.txt
do
# credits.txt has Mac line endings, other have PC
sed 's/\r$//g;s/\r/\n/g' $F |
iconv -f ISO-8859-1 -t UTF-8 >$F.conv
touch -r $F $F.conv
mv $F.conv $F
done
# Switch to native look and feel by default
# This can not be easily patched, as the file does not contain line breaks,
# and a xml editing tool would probably be an overkill
sed 's/look-and-feel="default"/look-and-feel="native"/' saved/ui_settings.xml >saved/ui_settings.xml.native
touch -r saved/ui_settings.xml saved/ui_settings.xml.native
mv saved/ui_settings.xml.native saved/ui_settings.xml
# Build classes and documentation
cd scripts
ant build document
%install
rm -rf $RPM_BUILD_ROOT
# Directory structure
install -d $RPM_BUILD_ROOT%{_bindir}
install -d $RPM_BUILD_ROOT%{_javadir}/mars-sim
install -d $RPM_BUILD_ROOT%{_datadir}/mars-sim
install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -d $RPM_BUILD_ROOT%{_datadir}/applications
install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}
# Install JARs and version them
install -m 644 jars/*.jar *.jar $RPM_BUILD_ROOT%{_javadir}/%{name}
(cd $RPM_BUILD_ROOT%{_javadir}/%{name}; for F in *.jar; do
V=$(echo $F |sed 's/\.jar$/-%{version}.jar/')
mv $F $V
ln -s $V $F
done)
# JavaDoc and data files
cp -rp docs/help images sounds $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -rp conf saved $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -rp docs/javadoc/. $RPM_BUILD_ROOT%{_javadocdir}/%{name}
# Executable
install -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/mars-sim
# Menu entry and icon
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/pixmaps/mars-sim.png
desktop-file-install --vendor=Fedora %{SOURCE4} \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_javadir}/mars-sim
%{_datadir}/mars-sim
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%{_bindir}/mars-sim
%doc docs/configuration.txt docs/credits.txt
%doc docs/GPL_License.txt
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}
%changelog
* Thu Jul 24 2008 Lubomir Rintel (Fedora Astronomy) <lkundrak at fedoraproject.org> - 2.84-2
- plexus dependency renamed to plexus-graph
- Require proper JDK
* Sat Jul 19 2008 Lubomir Rintel (Fedora Astronomy) <lkundrak at fedoraproject.org> - 2.84-1
- Initial packaging
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/mars-sim/EL-5/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 10 Aug 2008 01:12:33 -0000 1.1
+++ .cvsignore 10 Aug 2008 07:42:30 -0000 1.2
@@ -0,0 +1 @@
+MarsProject_2.84-fedora.tar.gz
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/mars-sim/EL-5/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 10 Aug 2008 01:12:33 -0000 1.1
+++ sources 10 Aug 2008 07:42:30 -0000 1.2
@@ -0,0 +1 @@
+986c3460c2b7655ee04b53e42f885c26 MarsProject_2.84-fedora.tar.gz
- Previous message (by thread): rpms/node/F-8 node-0.3.2-conf.patch, NONE, 1.1 node-0.3.2-install.patch, NONE, 1.1 node-0.3.2-rose.patch, NONE, 1.1 node.spec, NONE, 1.1 node.xinetd, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/mars-sim/devel import.log, NONE, 1.1 mars-sim, NONE, 1.1 mars-sim-2.84-java15.patch, NONE, 1.1 mars-sim-2.84-jfreegraph.patch, NONE, 1.1 mars-sim-2.84-manifest.patch, NONE, 1.1 mars-sim-2.84-paths.patch, NONE, 1.1 mars-sim-strip.sh, NONE, 1.1 mars-sim.desktop, NONE, 1.1 mars-sim.png, NONE, 1.1 mars-sim.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list