From 046c087940593090a795dd72acea30e6563d9d4c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 24 Feb 2017 14:53:58 +0100 Subject: [speedcheck] New module --- .../data/opt/openslx/bin/image_speedcheck | 6 ++++++ core/modules/speedcheck/module.build | 25 ++++++++++++++++++++++ core/modules/speedcheck/module.conf | 3 +++ core/modules/speedcheck/module.conf.debian | 4 ++++ core/modules/speedcheck/module.conf.opensuse | 4 ++++ core/modules/speedcheck/module.conf.ubuntu | 4 ++++ 6 files changed, 46 insertions(+) create mode 100755 core/modules/speedcheck/data/opt/openslx/bin/image_speedcheck create mode 100644 core/modules/speedcheck/module.build create mode 100644 core/modules/speedcheck/module.conf create mode 100644 core/modules/speedcheck/module.conf.debian create mode 100644 core/modules/speedcheck/module.conf.opensuse create mode 100644 core/modules/speedcheck/module.conf.ubuntu (limited to 'core/modules/speedcheck') diff --git a/core/modules/speedcheck/data/opt/openslx/bin/image_speedcheck b/core/modules/speedcheck/data/opt/openslx/bin/image_speedcheck new file mode 100755 index 00000000..b556ff22 --- /dev/null +++ b/core/modules/speedcheck/data/opt/openslx/bin/image_speedcheck @@ -0,0 +1,6 @@ +#!/bin/bash + +FILE=$(find /mnt/vmstore -type f -printf "%s\t%p\n" | sort -n | tail -n 1 | awk '{print $2}') + +exec speedcheck "$FILE" + diff --git a/core/modules/speedcheck/module.build b/core/modules/speedcheck/module.build new file mode 100644 index 00000000..c98ae1ff --- /dev/null +++ b/core/modules/speedcheck/module.build @@ -0,0 +1,25 @@ + +fetch_source() { + git clone "${REQUIRED_GIT}" "${MODULE_WORK_DIR}/src" +} + +build() { + local SRCDIR="${MODULE_WORK_DIR}/src/" + + [ ! -d "${MODULE_BUILD_DIR}/${REQUIRED_PREFIX}" ] && mkdir -p "${MODULE_BUILD_DIR}/${REQUIRED_PREFIX}" + cd "${MODULE_BUILD_DIR}/${REQUIRED_PREFIX}" + + pinfo "Running cmake" + # use qt4-dev (in case eg. qt4 and 5 are installed) + activate_qt 4 + + cmake "$SRCDIR" || perror "'cmake $SRCDIR' failed." + make || perror "'make' failed." + + cd - > /dev/null +} + +post_copy() { + : +} + diff --git a/core/modules/speedcheck/module.conf b/core/modules/speedcheck/module.conf new file mode 100644 index 00000000..bafa3662 --- /dev/null +++ b/core/modules/speedcheck/module.conf @@ -0,0 +1,3 @@ +REQUIRED_GIT="git://git.openslx.org/openslx-ng/speedcheck.git" +REQUIRED_PREFIX="/opt/openslx/bin" +REQUIRED_BINARIES="speedcheck" diff --git a/core/modules/speedcheck/module.conf.debian b/core/modules/speedcheck/module.conf.debian new file mode 100644 index 00000000..2953ac63 --- /dev/null +++ b/core/modules/speedcheck/module.conf.debian @@ -0,0 +1,4 @@ +REQUIRED_INSTALLED_PACKAGES=" + cmake + libqt4-dev +" diff --git a/core/modules/speedcheck/module.conf.opensuse b/core/modules/speedcheck/module.conf.opensuse new file mode 100644 index 00000000..75cb7dd6 --- /dev/null +++ b/core/modules/speedcheck/module.conf.opensuse @@ -0,0 +1,4 @@ +REQUIRED_INSTALLED_PACKAGES=" + cmake + libqt4-devel +" diff --git a/core/modules/speedcheck/module.conf.ubuntu b/core/modules/speedcheck/module.conf.ubuntu new file mode 100644 index 00000000..2953ac63 --- /dev/null +++ b/core/modules/speedcheck/module.conf.ubuntu @@ -0,0 +1,4 @@ +REQUIRED_INSTALLED_PACKAGES=" + cmake + libqt4-dev +" -- cgit v1.2.3-55-g7522