From 5acda3eaeabae9045609539303a8c12c4ce401f1 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 25 Apr 2016 12:01:08 +0200 Subject: merge with latest dev version --- .../pvs2/data/opt/openslx/scripts/setup-pvsmgr | 4 +++ .../openslx/vmchooser/sessionstart.d/50-PVSclient | 26 ++++++++++++++++ .../pvs2/data/usr/share/xsessions/pvs2mgr.desktop | 7 +++++ core/modules/pvs2/module.build | 35 ++++++++++++++++++++++ core/modules/pvs2/module.conf | 13 ++++++++ core/modules/pvs2/module.conf.debian | 6 ++++ core/modules/pvs2/module.conf.fedora | 6 ++++ core/modules/pvs2/module.conf.opensuse | 14 +++++++++ core/modules/pvs2/module.conf.ubuntu | 11 +++++++ 9 files changed, 122 insertions(+) create mode 100755 core/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr create mode 100755 core/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient create mode 100755 core/modules/pvs2/data/usr/share/xsessions/pvs2mgr.desktop create mode 100644 core/modules/pvs2/module.build create mode 100644 core/modules/pvs2/module.conf create mode 100644 core/modules/pvs2/module.conf.debian create mode 100644 core/modules/pvs2/module.conf.fedora create mode 100644 core/modules/pvs2/module.conf.opensuse create mode 100644 core/modules/pvs2/module.conf.ubuntu (limited to 'core/modules/pvs2') diff --git a/core/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr b/core/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr new file mode 100755 index 00000000..dedb0995 --- /dev/null +++ b/core/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr @@ -0,0 +1,4 @@ +#!/bin/ash + +openbox & +exec /opt/openslx/bin/pvsmgr diff --git a/core/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient b/core/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient new file mode 100755 index 00000000..0ad739e0 --- /dev/null +++ b/core/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient @@ -0,0 +1,26 @@ +#!/bin/ash + +# SESSION_TYPE can be either 'VSESSION' or 'XSESSION' - currently not evaluated + +# detect session command of the PVS-Manager session by looking at the xsession file +PVSMGR_SESSION_CMD= +PVSMGR_XSESSION_FILE="pvs2mgr.desktop" +# the second directory should not be needed, but lets be compatible with the old crap...... +for DIR in "/usr/share/xsessions" "/opt/openslx/xsessions/"; do + if [ -f "${DIR}/${PVSMGR_XSESSION_FILE}" ]; then + # extract the exact command string + PVSMGR_SESSION_CMD="$(grep -E "^Exec=.*$" "${DIR}/${PVSMGR_XSESSION_FILE}" |cut -c 6-)" + break + fi +done +if [ -n "${PVSMGR_SESSION_CMD}" ]; then + # do not start pvsclient if we are running the pvs manager session + [ "x${SESSION_CMD}" == "x${PVSMGR_SESSION_CMD}" ] && exit 0 +fi +# If the ENV var PVS has been set by vmchooser start pvsclient +if [ -n "$PVS_AUTO_CONNECT" -a "$PVS_AUTO_CONNECT" == "TRUE" ]; then + pvsclient --auto & +else + pvsclient & +fi +exit 0 diff --git a/core/modules/pvs2/data/usr/share/xsessions/pvs2mgr.desktop b/core/modules/pvs2/data/usr/share/xsessions/pvs2mgr.desktop new file mode 100755 index 00000000..3cd1be2c --- /dev/null +++ b/core/modules/pvs2/data/usr/share/xsessions/pvs2mgr.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=PVS Steuerkonsole +Exec=/opt/openslx/scripts/setup-pvsmgr +TryExec=/opt/openslx/bin/pvsmgr +Icon= +Type=Application diff --git a/core/modules/pvs2/module.build b/core/modules/pvs2/module.build new file mode 100644 index 00000000..b7ccfa47 --- /dev/null +++ b/core/modules/pvs2/module.build @@ -0,0 +1,35 @@ +#!/bin/bash + +fetch_source() { + git clone "${REQUIRED_GIT}" src +} + +build() { + + local SRCDIR="${MODULE_WORK_DIR}/src/" + local BUILDDIR="$SRCDIR/build/" + local DESTDIR="$MODULE_BUILD_DIR/opt/openslx/bin" + + # first activate qt 4 + activate_qt 4 + + mkdir -p "$DESTDIR" || perror "Could not mkdir $DESTDIR!" + mkdir -p "$BUILDDIR" || perror "Could not mkdir $BUILDDIR!" + cd "$BUILDDIR" || perror "Could not cd to $BUILDDIR!" + + pinfo "Running cmake" + cmake .. || perror "'cmake ..' failed." + pinfo "Running make" + make || perror "'make' failed." + mv pvsmgr pvsclient $DESTDIR + cd - > /dev/null + + # needed for copying REQUIRED_CONTENT_PACKAGES to build/ + COPYLIST="list_dpkg_output" + [ -e "$COPYLIST" ] && rm "$COPYLIST" + list_packet_files >> "$COPYLIST" + tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}" +} +post_copy() { + : +} diff --git a/core/modules/pvs2/module.conf b/core/modules/pvs2/module.conf new file mode 100644 index 00000000..9ef50afd --- /dev/null +++ b/core/modules/pvs2/module.conf @@ -0,0 +1,13 @@ +REQUIRED_GIT="git://git.openslx.org/pvs2.git" +REQUIRED_BINARIES=" + pvsmgr + pvsclient +" +REQUIRED_LIBRARIES=" +" +REQUIRED_SYSTEM_FILES=" +" +REQUIRED_MODULES=" + x11vnc +" +# TODO add libraries diff --git a/core/modules/pvs2/module.conf.debian b/core/modules/pvs2/module.conf.debian new file mode 100644 index 00000000..f031a225 --- /dev/null +++ b/core/modules/pvs2/module.conf.debian @@ -0,0 +1,6 @@ +REQUIRED_INSTALLED_PACKAGES=" +libqt4-dev +libvncserver-dev +" +REQUIRED_CONTENT_PACKAGES=" +" diff --git a/core/modules/pvs2/module.conf.fedora b/core/modules/pvs2/module.conf.fedora new file mode 100644 index 00000000..6d2cd0f6 --- /dev/null +++ b/core/modules/pvs2/module.conf.fedora @@ -0,0 +1,6 @@ +REQUIRED_INSTALLED_PACKAGES=" + qt-devel + libvncserver-devel +" +REQUIRED_CONTENT_PACKAGES=" +" diff --git a/core/modules/pvs2/module.conf.opensuse b/core/modules/pvs2/module.conf.opensuse new file mode 100644 index 00000000..aedc0d96 --- /dev/null +++ b/core/modules/pvs2/module.conf.opensuse @@ -0,0 +1,14 @@ +REQUIRED_INSTALLED_PACKAGES=" + libqt4-devel + LibVNCServer-devel +" + +REQUIRED_CONTENT_PACKAGES=" + libqt4 +" + +REQUIRED_DIRECTORIES=" + /usr/$LIB64/ +" + +# libqt4-svg diff --git a/core/modules/pvs2/module.conf.ubuntu b/core/modules/pvs2/module.conf.ubuntu new file mode 100644 index 00000000..4dcf2794 --- /dev/null +++ b/core/modules/pvs2/module.conf.ubuntu @@ -0,0 +1,11 @@ +REQUIRED_INSTALLED_PACKAGES=" + libqt4-dev + libvncserver-dev +" +REQUIRED_CONTENT_PACKAGES=" + libqt4-svg + libqtgui4 +" +REQUIRED_DIRECTORIES=" + /usr/lib/ +" -- cgit v1.2.3-55-g7522