summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOla Nordmann <olapc@yahoo.no>2001-10-01 11:50:34 +0000
committerOla Nordmann <olapc@yahoo.no>2001-10-01 11:50:34 +0000
commit3095d2c801e948b90fb34051fb7aff6ae0f949bb (patch)
treeaf2d7f6620166c0cbe21a5d15b9c83a7bdd61de9
parent307f3a32e64ddd4de7b3e07f38d004c7de8d4a05 (diff)
downloadjava-common-3095d2c801e948b90fb34051fb7aff6ae0f949bb.tar.gz
Moved java-compiler-dummy to java-common.
-rw-r--r--debian/java-compiler-dummy.README.Debian21
-rw-r--r--debian/java-compiler-dummy.conffiles1
-rw-r--r--debian/java-compiler-dummy.dirs3
-rw-r--r--debian/java-compiler-dummy.prerm9
-rw-r--r--dummy/compiler/java-c60
-rw-r--r--dummy/compiler/java-c.130
-rw-r--r--dummy/compiler/java-c.conf-gcj4
-rw-r--r--dummy/compiler/java-c.conf-guavac4
-rw-r--r--dummy/compiler/java-c.conf-jdk3
-rw-r--r--dummy/compiler/java-c.conf-jikes4
10 files changed, 139 insertions, 0 deletions
diff --git a/debian/java-compiler-dummy.README.Debian b/debian/java-compiler-dummy.README.Debian
new file mode 100644
index 0000000..82f9de7
--- /dev/null
+++ b/debian/java-compiler-dummy.README.Debian
@@ -0,0 +1,21 @@
+java-compiler-dummy for DEBIAN
+----------------------
+
+It is a dummy package, intended to comply with the Java policy,
+while there are some Debian-packaged compilers that do not
+provide java-compiler.
+
+Install it ONLY if you really have a Java compiler.
+
+The executable java-c will set the CLASSPATH according to the
+Debian Java policy, before running an actual Java compiler
+(set in /etc/java-c, defaults to the compiler in the jikes package).
+
+You have examples of /etc/java-c files for all the Java compilers of
+Debian in /usr/doc/java-compiler-dummy/examples.
+
+Do note that all the Java compilers in 'potato' comply with the Java
+policy.
+
+
+Stephane Bortzmeyer <bortzmeyer@debian.org>, Wed, 23 Jun 1999 15:03:43 +0200
diff --git a/debian/java-compiler-dummy.conffiles b/debian/java-compiler-dummy.conffiles
new file mode 100644
index 0000000..1a98d3b
--- /dev/null
+++ b/debian/java-compiler-dummy.conffiles
@@ -0,0 +1 @@
+/etc/java/java-c.conf
diff --git a/debian/java-compiler-dummy.dirs b/debian/java-compiler-dummy.dirs
new file mode 100644
index 0000000..d6a8a7e
--- /dev/null
+++ b/debian/java-compiler-dummy.dirs
@@ -0,0 +1,3 @@
+usr/bin
+etc/java
+
diff --git a/debian/java-compiler-dummy.prerm b/debian/java-compiler-dummy.prerm
new file mode 100644
index 0000000..44f8370
--- /dev/null
+++ b/debian/java-compiler-dummy.prerm
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+#DEBHELPER#
+
+if [ $1 != "upgrade" ] ; then
+ update-alternatives --remove javac /usr/bin/java-c
+fi
+
+
diff --git a/dummy/compiler/java-c b/dummy/compiler/java-c
new file mode 100644
index 0000000..edfa90b
--- /dev/null
+++ b/dummy/compiler/java-c
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# java-c
+# Copyright 1999 Stephane Bortzmeyer.
+# 2001 Ola Lundqvist
+# Licensed under the GNU GPL.
+set -e
+
+repository=/usr/share/java/repository
+conf=/etc/java/java-c.conf
+
+javac=`head -1 $conf`
+
+if [ ! -n "$javac" ]
+then
+ echo "Cannot find a Java compiler in $conf"
+ exit 1
+fi
+
+defclasspath=`head -2 $conf | tail -1`
+
+if [ -n "$defclasspath" ]
+then
+ MYCLASSPATH=${defclasspath}
+fi
+
+compliant=`head -3 $conf | tail -1`
+
+if [ "xx$compliant" != "xxCOMPLIANT" ]
+then
+ if [ -n "$MYCLASSPATH" ]
+ then
+ MYCLASSPATH=${MYCLASSPATH}:$repository
+ else
+ MYCLASSPATH=$repository
+ fi
+fi
+
+if [ -n "$CLASSPATH" ]
+then
+ if [ -n "$MYCLASSPATH" ]
+ then
+ MYCLASSPATH=${MYCLASSPATH}:${CLASSPATH}
+ else
+ MYCLASSPATH=${CLASSPATH}
+ fi
+fi
+
+if [ -n "$MYCLASSPATH" ]
+then
+ CLASSPATH=$MYCLASSPATH
+ export CLASSPATH
+ #echo $CLASSPATH
+fi
+
+exec "$javac" "$@"
+
+echo "Cannot run $javac (found in $conf)"
+exit 1
+
diff --git a/dummy/compiler/java-c.1 b/dummy/compiler/java-c.1
new file mode 100644
index 0000000..6320462
--- /dev/null
+++ b/dummy/compiler/java-c.1
@@ -0,0 +1,30 @@
+.TH JAVA-C 1
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH JAVA-C
+java-c \- A dummy Java compiler for the Java policy
+.SH SYNOPSIS
+.B java-c
+.I "[options] files ..."
+.SH "DESCRIPTION"
+This manual page documents briefly the
+.BR java-c
+command.
+.PP
+.B java-c
+is a wrapper around the real Java compiler. It sets the CLASSPATH according
+to the Debian Java policy (if the compiler is not already compliant) and
+can also add other mandatory directories to the CLASSPATH. This is configured
+in
+/etc/java-c
+(see examples hereunder).
+.PP
+Your own CLASSPATH will be saved and appended.
+.SH OPTIONS
+They are passed uninterpreted to the compiler.
+.SH "SEE ALSO"
+/usr/doc/java-compiler-dummy
+and specially the "examples" directory.
+.SH AUTHOR
+This manual page was written by Stephane Bortzmeyer <bortzmeyer@debian.org>,
+for the Debian GNU/Linux system (but may be used by others).
diff --git a/dummy/compiler/java-c.conf-gcj b/dummy/compiler/java-c.conf-gcj
new file mode 100644
index 0000000..f8c7653
--- /dev/null
+++ b/dummy/compiler/java-c.conf-gcj
@@ -0,0 +1,4 @@
+/usr/bin/gcj
+
+COMPLIANT
+
diff --git a/dummy/compiler/java-c.conf-guavac b/dummy/compiler/java-c.conf-guavac
new file mode 100644
index 0000000..bf2077a
--- /dev/null
+++ b/dummy/compiler/java-c.conf-guavac
@@ -0,0 +1,4 @@
+/usr/bin/guavac
+
+COMPLIANT
+
diff --git a/dummy/compiler/java-c.conf-jdk b/dummy/compiler/java-c.conf-jdk
new file mode 100644
index 0000000..7ac8b85
--- /dev/null
+++ b/dummy/compiler/java-c.conf-jdk
@@ -0,0 +1,3 @@
+/usr/lib/jdk1.1/bin/javac
+
+COMPLIANT
diff --git a/dummy/compiler/java-c.conf-jikes b/dummy/compiler/java-c.conf-jikes
new file mode 100644
index 0000000..bdefc14
--- /dev/null
+++ b/dummy/compiler/java-c.conf-jikes
@@ -0,0 +1,4 @@
+/usr/bin/jikes
+/usr/share/kaffe/Klasses.jar:/usr/share/java/repository
+COMPLIANT
+