summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Eleftheriou2017-10-18 00:02:22 +0200
committerGeorge Eleftheriou2017-10-18 00:02:22 +0200
commit7429aaf52a723fc146851936b3af6874435f53c2 (patch)
tree5a9e86fd720c40ff1cbd43dbfe04679bd937af4a
parent4dbf6d4bee343c29f04e659ef51bad490035bde3 (diff)
downloadaur-7429aaf52a723fc146851936b3af6874435f53c2.tar.gz
including the wrapper/launcher script in the sources
-rw-r--r--.SRCINFO6
-rwxr-xr-xHDFView36
-rw-r--r--HDFView.desktop2
-rw-r--r--PKGBUILD11
4 files changed, 48 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fedba97566a..dc7cc003887 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = hdfview
pkgdesc = a GUI browser for hdf5 files
pkgver = 2.14.0
- pkgrel = 2
+ pkgrel = 3
url = https://support.hdfgroup.org/products/java/
arch = i686
arch = x86_64
@@ -14,10 +14,12 @@ pkgbase = hdfview
source = HDFView.desktop
source = HDFView.ico
source = license
+ source = HDFView
md5sums = 3dafb38490718d46e359d250c7bb2377
- md5sums = 78b1eb484df4520d83bf9a20f39a65e3
+ md5sums = 4d40ab135641713c9b4ab0a41f1e1bf7
md5sums = b86542f80203ea9f93f447fa7c20d25a
md5sums = db0de6079dd881781768d05de29c50e0
+ md5sums = 5e498af8f85e275ab0bb583b0ab0a1b3
pkgname = hdfview
diff --git a/HDFView b/HDFView
new file mode 100755
index 00000000000..ef0d843f0d6
--- /dev/null
+++ b/HDFView
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+##############################################################################
+# HDF Viewer Wrapper
+##############################################################################
+
+# Configure appropriate fallback values:
+HDFVIEW_APPLICATION="${HDFVIEW_APPLICATION:-/usr/bin/hdfview.sh}"
+HDFVIEW_FONT_PATH="${HDFVIEW_FONT_PATH:-/usr/share/fonts/truetype}"
+HDFVIEW_FONT_TYPE="${HDFVIEW_FONT_TYPE:-$(fc-match --format '%{family}' sans)}"
+HDFVIEW_FONT_SIZE="${HDFVIEW_FONT_SIZE:-12}"
+HDFVIEW_ANTIALIAS="${HDFVIEW_ANTIALIAS:-on}"
+HDFVIEW_LOOK_FEEL="${HDFVIEW_LOOK_FEEL:-com.sun.java.swing.plaf.gtk.GTKLookAndFeel}"
+
+# Glob for configuration files:
+HDFVIEW_CFG_FILES=$(echo ~/.hdfview[0-9]*.[0-9]*)
+
+# Attempt to fix fonts:
+sed -i -r "s|^(font\.size)=.*\$|\\1=${HDFVIEW_FONT_SIZE}|" ${HDFVIEW_CFG_FILES}
+sed -i -r "s|^(font\.type)=.*\$|\\1=${HDFVIEW_FONT_TYPE}|" ${HDFVIEW_CFG_FILES}
+export JAVA_FONTS="${FONT_PATH}"
+
+# Attempt to fix look and feel:
+JAVA_OPTIONS=(
+ "-Dawt.useSystemAAFontSettings=${HDFVIEW_ANTIALIAS}"
+ "-Dswing.defaultlaf=${HDFVIEW_LOOK_FEEL}"
+ "-Dswing.crossplatformlaf=${HDFVIEW_LOOK_FEEL}"
+)
+JAVA_OPTIONS=$(printf ' %s' "${JAVA_OPTIONS[@]}")
+JAVA_OPTIONS=${JAVA_OPTIONS:1}
+export _JAVA_OPTIONS=${JAVA_OPTIONS}
+
+# Launch the viewer:
+exec ${HDFVIEW_APPLICATION}
+
+##############################################################################
+# vim:et:ft=sh:nowrap:sts=4:sw=4:ts=4
diff --git a/HDFView.desktop b/HDFView.desktop
index 551e67a2854..0608c14d089 100644
--- a/HDFView.desktop
+++ b/HDFView.desktop
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=HDFView
Comment=HDFView is a GUI tool for browsing and editing HDF4 and HDF5 files.
-Exec=/usr/bin/hdfview.sh
+Exec=/usr/bin/HDFView
Icon=/usr/share/pixmaps/HDFView.ico
Terminal=false
Type=Application
diff --git a/PKGBUILD b/PKGBUILD
index d123e0ab0d9..bd128c6fc2d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@ pkgname=hdfview
_pkgname=HDFView
pkgver=2.14.0
_pkgver=${pkgver%.0}
-pkgrel=2
+pkgrel=3
pkgdesc="a GUI browser for hdf5 files"
arch=('i686' 'x86_64')
url="https://support.hdfgroup.org/products/java/"
@@ -18,11 +18,13 @@ options=(!strip)
source=("https://support.hdfgroup.org/ftp/HDF5/hdf-java/current/src/${pkgname}-${_pkgver}.tar.gz"
"${_pkgname}.desktop"
"${_pkgname}.ico"
- license)
+ license
+ HDFView)
md5sums=('3dafb38490718d46e359d250c7bb2377'
- '78b1eb484df4520d83bf9a20f39a65e3'
+ '4d40ab135641713c9b4ab0a41f1e1bf7'
'b86542f80203ea9f93f447fa7c20d25a'
- 'db0de6079dd881781768d05de29c50e0')
+ 'db0de6079dd881781768d05de29c50e0'
+ '5e498af8f85e275ab0bb583b0ab0a1b3')
prepare() {
cd "${pkgname}-${_pkgver}"
@@ -54,6 +56,7 @@ package() {
cp -a "${_pkgname}/${pkgver}/${pkgname}.sh" "${pkgdir}/usr/bin"
# Desktop files, icons, wrappers and license
+ install -D -m 755 "${srcdir}/${_pkgname}" "${pkgdir}/usr/bin/HDFView"
install -D -m 644 "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
install -D -m 644 "${srcdir}/${_pkgname}.ico" "${pkgdir}/usr/share/pixmaps/${_pkgname}.ico"
install -D -m 644 "${srcdir}/license" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"