summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Conseil2015-06-13 00:18:47 +0200
committerSimon Conseil2015-06-13 00:18:47 +0200
commite8537a7ca4eedf175c432f07fda21760c2564a11 (patch)
treea0a95d768fd6760f5032f7729c73e8cc9c0d02c4
downloadaur-e8537a7ca4eedf175c432f07fda21760c2564a11.tar.gz
Initial import
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD26
-rw-r--r--tc3.gifbin0 -> 2816 bytes
-rw-r--r--topcat60
4 files changed, 105 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ac355e40555e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = topcat
+ pkgdesc = Tool for OPerations on Catalogues And Tables
+ pkgver = 4.2.3
+ pkgrel = 1
+ url = http://www.star.bris.ac.uk/~mbt/topcat/
+ arch = any
+ license = GPL
+ depends = java-environment
+ depends = sh
+ noextract = topcat-full.jar
+ source = ftp://andromeda.star.bris.ac.uk/pub/star/topcat/v4.2-3/topcat-full.jar
+ source = topcat
+ source = tc3.gif
+ md5sums = a432b814b0b0c9952cd967ac111c4a82
+ md5sums = 5f2df6a05c72b5641bf6a2b1c29173ed
+ md5sums = 7ff53d3f87a464f70e5de7c8531cb2df
+
+pkgname = topcat
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..75a56807c8b4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Simon Conseil <contact+aur at saimon dot org>
+pkgname=topcat
+pkgver=4.2.3
+_pkgver=4.2-3
+pkgrel=1
+pkgdesc="Tool for OPerations on Catalogues And Tables"
+arch=('any')
+url="http://www.star.bris.ac.uk/~mbt/topcat/"
+depends=('java-environment' 'sh')
+license=('GPL')
+noextract=('topcat-full.jar')
+source=("ftp://andromeda.star.bris.ac.uk/pub/star/topcat/v${_pkgver}/topcat-full.jar"
+ "topcat" "tc3.gif")
+md5sums=('a432b814b0b0c9952cd967ac111c4a82'
+ '5f2df6a05c72b5641bf6a2b1c29173ed'
+ '7ff53d3f87a464f70e5de7c8531cb2df')
+
+package() {
+ cd "$srcdir"
+ mkdir -p "$pkgdir/usr/share/java"
+ mkdir -p "$pkgdir/usr/bin"
+ mkdir -p "$pkgdir/usr/share/pixmaps"
+ install -m644 "$srcdir"/topcat-full.jar "$pkgdir"/usr/share/java
+ install -m755 "$srcdir"/topcat "$pkgdir"/usr/bin/topcat
+ install -m755 "$srcdir"/tc3.gif "$pkgdir"/usr/share/pixmaps
+}
diff --git a/tc3.gif b/tc3.gif
new file mode 100644
index 000000000000..c1f68a4f6088
--- /dev/null
+++ b/tc3.gif
Binary files differ
diff --git a/topcat b/topcat
new file mode 100644
index 000000000000..7c241963573a
--- /dev/null
+++ b/topcat
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+#+
+# Name:
+# topcat
+
+# Purpose:
+# Invokes the TOPCAT application on unix
+
+# Description:
+# This shell script invokes the TOPCAT application.
+# It's not very complicated, but performs some argument manipulation
+# prior to invoking java with the right classpath and classname.
+#
+# 1. if a class path is specified using either the CLASSPATH
+# environment variable or the -classpath flag to this script,
+# it will be added to the application classpath
+#
+# 2. any command-line arguments which look like they are destined
+# for java itself (starting with -D or -X, or prefixed with -J) will
+# be sent to java, and the others will be sent to the application
+
+# Requisites:
+# - java should be on the path.
+#
+
+# Authors:
+# MBT: Mark Taylor (Starlink)
+#-
+
+# Divide the arguments into two parts: those destined as flags for
+# the java binary, and the rest.
+javaArgs=""
+appArgs=""
+while test "$1"
+do
+ if echo $1 | grep -- '^-[XD]' >/dev/null; then
+ javaArgs="$javaArgs "\'$1\'
+ elif echo $1 | grep -- '^-J' >/dev/null; then
+ javaArgs="$javaArgs "\'`echo $1 | sed s/^-J//`\'
+ elif [ "$1" = "-classpath" -a -n "$2" ]; then
+ shift
+ export CLASSPATH="$1"
+ else
+ appArgs="$appArgs "\'$1\'
+ fi
+ shift
+done
+
+appjar=/usr/share/java/topcat-full.jar
+CLASSPATH="${appjar}:${CLASSPATH}"
+
+# Run topcat.
+cmd="java \
+ $javaArgs0 \
+ $javaArgs \
+ -Duk.ac.starlink.topcat.cmdname=topcat \
+ -classpath \${CLASSPATH} uk.ac.starlink.topcat.Driver \
+ $appArgs"
+eval "$cmd"