summaryrefslogtreecommitdiffstats
path: root/core/modules/pvs2
diff options
context:
space:
mode:
authorSebastian2016-04-25 12:01:08 +0200
committerSebastian2016-04-25 12:01:08 +0200
commit5acda3eaeabae9045609539303a8c12c4ce401f1 (patch)
tree7e71975f8570b05aafe2ea6ec0e242a8912387bb /core/modules/pvs2
parentinitial commit (diff)
downloadmltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.gz
mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.xz
mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.zip
merge with latest dev version
Diffstat (limited to 'core/modules/pvs2')
-rwxr-xr-xcore/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr4
-rwxr-xr-xcore/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient26
-rwxr-xr-xcore/modules/pvs2/data/usr/share/xsessions/pvs2mgr.desktop7
-rw-r--r--core/modules/pvs2/module.build35
-rw-r--r--core/modules/pvs2/module.conf13
-rw-r--r--core/modules/pvs2/module.conf.debian6
-rw-r--r--core/modules/pvs2/module.conf.fedora6
-rw-r--r--core/modules/pvs2/module.conf.opensuse14
-rw-r--r--core/modules/pvs2/module.conf.ubuntu11
9 files changed, 122 insertions, 0 deletions
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/
+"