diff options
author | Yigit Dallilar | 2022-04-05 13:24:43 -0400 |
---|---|---|
committer | Yigit Dallilar | 2022-04-05 13:24:43 -0400 |
commit | f8f8d9ca70c4dbb85d602e79329bcfa09f8bcd9f (patch) | |
tree | a7e440d586d6023fda89f911998514a73b0f482b | |
download | aur-f8f8d9ca70c4dbb85d602e79329bcfa09f8bcd9f.tar.gz |
init
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 55 | ||||
-rw-r--r-- | esoreflex.install | 26 | ||||
-rw-r--r-- | esoreflex.patch | 41 | ||||
-rw-r--r-- | esoreflex.sh | 3 | ||||
-rw-r--r-- | esoreflex.sysusers | 1 |
6 files changed, 148 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3ce32fe8d22a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = esoreflex + pkgdesc = EsoReflex is an environment that provides an easy and flexible way to reduce VLT/VLTI science data using the ESO pipelines. + pkgver = 2.11.5 + pkgrel = 1 + url = https://www.eso.org/sci/software/esoreflex/ + install = esoreflex.install + arch = x86_64 + license = GPL3 + depends = java-environment + optdepends = python-astropy: enables interactivity with system-wide python installation + optdepends = python-matplotlib: enables interactivity with system-wide python installation + optdepends = python-wxpython: enables interactivity with system-wide python installation + source = https://ftp.eso.org/pub/dfs/reflex/esoreflex-2.11.5.tar.gz + source = esoreflex.sysusers + source = esoreflex.sh + source = esoreflex.patch + md5sums = 8754d013b6e9c9cef40439c7e4560b6b + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + +pkgname = esoreflex diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c441ed6f4472 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Yigit Dallilar <yigit.dallilar@gmail.com> + +pkgname=esoreflex +pkgver=2.11.5 +pkgrel=1 +pkgdesc="EsoReflex is an environment that provides an easy and flexible way to reduce VLT/VLTI science data using the ESO pipelines. " +url="https://www.eso.org/sci/software/esoreflex/" +arch=('x86_64') +license=('GPL3') +depends=('java-environment') +makedepends=() +# Note all of them needs to be installed for interactivity to work, but conda environments +# can also alternatively be used to set it up +# See https://www.eso.org/sci/observing/phase2/Using_conda_w_esoreflex.html +optdepends=('python-astropy: enables interactivity with system-wide python installation' + 'python-matplotlib: enables interactivity with system-wide python installation' + 'python-wxpython: enables interactivity with system-wide python installation') +provides=() +conflicts=() +replaces=() +backup=() +options=() +source=(https://ftp.eso.org/pub/dfs/reflex/esoreflex-${pkgver}.tar.gz + esoreflex.sysusers + esoreflex.sh + esoreflex.patch) +md5sums=('8754d013b6e9c9cef40439c7e4560b6b' + SKIP + SKIP + SKIP) +install=esoreflex.install + +prepare() { + + cd ${srcdir}/${pkgname}-${pkgver} + patch --forward --strip=1 --input=${srcdir}/esoreflex.patch + +} + +package() { + + mkdir -p ${pkgdir}/opt/esoreflex + cp -aR ${srcdir}/${pkgname}-${pkgver}/* ${pkgdir}/opt/esoreflex/ + + install -D -m755 ${srcdir}/${pkgname}-${pkgver}/esoreflex/bin/esoreflex ${pkgdir}/usr/bin/esoreflex + mkdir -p ${pkgdir}/opt/esoreflex/esoreflex/python/__pycache__/ + chmod g+w -R ${pkgdir}/opt/esoreflex/esoreflex/python/__pycache__/ + chmod g+w -R ${pkgdir}/opt/esoreflex/build-area + + install -Dm644 ${srcdir}/${pkgname}.sysusers ${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf + install -Dm644 ${srcdir}/${pkgname}.sh ${pkgdir}/etc/profile.d/${pkgname}.sh + +} + +# vim:set ts=4 sw=4 et: diff --git a/esoreflex.install b/esoreflex.install new file mode 100644 index 000000000000..dba649e1fffb --- /dev/null +++ b/esoreflex.install @@ -0,0 +1,26 @@ + +post_upgrade () { + + chgrp -R esoreflex /opt/esoreflex + +} + +post_install () { + + post_upgrade + +} + +post_remove () { + + rm -rf /opt/esoreflex + +} + +pre_upgrade () { + + post_remove + +} + +# vim:set ts=4 sw=4 et: diff --git a/esoreflex.patch b/esoreflex.patch new file mode 100644 index 000000000000..61e9f410d65c --- /dev/null +++ b/esoreflex.patch @@ -0,0 +1,41 @@ +diff --color --unified --recursive --text esoreflex-2.11.5.orig/esoreflex/bin/esoreflex esoreflex-2.11.5.new/esoreflex/bin/esoreflex +--- esoreflex-2.11.5.orig/esoreflex/bin/esoreflex 2022-04-05 09:26:38.333571913 -0400 ++++ esoreflex-2.11.5.new/esoreflex/bin/esoreflex 2022-04-05 11:38:42.418766612 -0400 +@@ -216,12 +216,6 @@ + # location of this launch script, if not hardcoded. Use perl if we can to + # resolve any symbolic links in the path. The base path is used to identify the + # default location of the Reflex .jar and Reflex python files. +-ESOREFLEX_BASE=$(dirname $0)/../.. +-if command -v perl > /dev/null ; then +- ESOREFLEX_BASE=$(perl -MCwd=realpath -e "print realpath '$ESOREFLEX_BASE'") +-else +- ESOREFLEX_BASE=$(cd "$ESOREFLEX_BASE" ; pwd) +-fi + ESOREFLEX_JAR="$ESOREFLEX_BASE/esoreflex.jar" + + # This utility function will escape all special characters of a string so that +@@ -341,7 +335,7 @@ + + # Supply default values for various parameters in esoreflex.rc + JAVA_COMMAND=java +-ESOREFLEX_WORKFLOW_PATH=~/KeplerData/workflows/MyWorkflows ++ESOREFLEX_WORKFLOW_PATH=${ESOPIPES_DIR}/share/esopipes + ESOREX_COMMAND=esorex + LOAD_ESOREX_CONFIG="" + LOAD_ESOREX_RECIPE_CONFIG="" +@@ -1271,8 +1265,14 @@ + echo "================================================================================" + fi + ++export JAVA_COMMAND ++export ESOREFLEX_JAR ++ + # Now execute the esoreflex Java application. Save the exit code to return it later. +-$JAVA_COMMAND -jar "$ESOREFLEX_JAR" "$@" ++getent group esoreflex | grep -q "\b${USER}\b" && \ ++ sg esoreflex -c '$JAVA_COMMAND -jar $ESOREFLEX_JAR '"$@"'' || \ ++ { echo "Add user ${USER} to esoreflex group"; exit; } ++ + RESULT="$?" + + # Cleanup the temporary directory if it was created by prepare_non_interactive. diff --git a/esoreflex.sh b/esoreflex.sh new file mode 100644 index 000000000000..b97c35810823 --- /dev/null +++ b/esoreflex.sh @@ -0,0 +1,3 @@ + +export ESOREFLEX_BASE=/opt/esoreflex/ + diff --git a/esoreflex.sysusers b/esoreflex.sysusers new file mode 100644 index 000000000000..962b64d7fd4c --- /dev/null +++ b/esoreflex.sysusers @@ -0,0 +1 @@ +g esoreflex - - |