summaryrefslogtreecommitdiffstats
path: root/remote/modules/vmchooser
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules/vmchooser')
-rw-r--r--remote/modules/vmchooser/module.build36
-rw-r--r--remote/modules/vmchooser/module.conf3
-rw-r--r--remote/modules/vmchooser/module.conf.debian4
-rw-r--r--remote/modules/vmchooser/module.conf.opensuse4
-rw-r--r--remote/modules/vmchooser/module.conf.ubuntu4
5 files changed, 51 insertions, 0 deletions
diff --git a/remote/modules/vmchooser/module.build b/remote/modules/vmchooser/module.build
new file mode 100644
index 00000000..eb0a2d48
--- /dev/null
+++ b/remote/modules/vmchooser/module.build
@@ -0,0 +1,36 @@
+
+fetch_source() {
+ git clone "${REQUIRED_GIT}" src
+}
+
+build() {
+ local SRCDIR="${MODULE_DIR}/src/"
+
+ [ ! -d "${MODULE_BUILD_DIR}/${REQUIRED_PREFIX}" ] && mkdir -p "${MODULE_BUILD_DIR}/${REQUIRED_PREFIX}"
+ cd "${MODULE_BUILD_DIR}/${REQUIRED_PREFIX}"
+
+ # patch globals.cpp and globals.h to use standardised paths /opt/openslx/...
+ if ! grep -q VMCHOOSER_SCRIPTS_PATH "$SRCDIR/src/globals.h"; then
+ sed -i 's/^#define VMCHOOSER_BIN_PATH.*/#define VMCHOOSER_BIN_PATH "\/opt\/openslx\/bin"/g' "${SRCDIR}"/src/globals.h
+ sed -i 's/^#define VMCHOOSER_ETC_BASE_PATH.*/#define VMCHOOSER_ETC_BASE_PATH "\/opt\/openslx\/vmchooser\/config"/g' "${SRCDIR}"/src/globals.h
+ sed -i 's/^#define VMCHOOSER_BIN_PATH.*/#define VMCHOOSER_BIN_PATH "\/opt\/openslx\/bin"\n#define VMCHOOSER_SCRIPTS_PATH "\/opt\/openslx\/scripts"/g' "${SRCDIR}"/src/globals.h
+ sed -i 's/^#define VMCHOOSER_THEME_BASE.*/#define VMCHOOSER_THEME_BASE "\/opt\/openslx\/vmchooser\/themes"/g' "${SRCDIR}"/src/globals.h
+
+ sed -i 's/^QString binPath(VMCHOOSER_BIN_PATH);/QString binPath(VMCHOOSER_BIN_PATH);\nQString scriptsPath(VMCHOOSER_SCRIPTS_PATH);/g' "${SRCDIR}"/src/globals.cpp
+ sed -i 's/^QString runVmScript(binPath + "\/run-virt.sh");/QString runVmScript(scriptsPath + "\/vmchooser-run_virt");/g' "${SRCDIR}"/src/globals.cpp
+ sed -i 's/^QString filterScript(binPath + "\/xmlfilter.sh");/QString filterScript(scriptsPath + "\/vmchooser-xml_filter");/g' "${SRCDIR}"/src/globals.cpp
+ sed -i 's/^#define VMCHOOSER_VMPATH.*/#define VMCHOOSER_VMPATH "\/mnt\/vmstore"/g' "${SRCDIR}"/src/globals.h
+ fi
+
+ pinfo "Running cmake"
+ ln -sf qt4.conf /usr/share/qtchooser/default.conf
+ cmake "$SRCDIR" || perror "'cmake $SRCDIR' failed."
+ make || perror "'make' failed."
+
+ cd - &> /dev/null
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/vmchooser/module.conf b/remote/modules/vmchooser/module.conf
new file mode 100644
index 00000000..686eb8bf
--- /dev/null
+++ b/remote/modules/vmchooser/module.conf
@@ -0,0 +1,3 @@
+REQUIRED_GIT="git://git.openslx.org/openslx/tools/vmchooser.git"
+REQUIRED_PREFIX="/opt/openslx/bin"
+REQUIRED_BINARIES="vmchooser"
diff --git a/remote/modules/vmchooser/module.conf.debian b/remote/modules/vmchooser/module.conf.debian
new file mode 100644
index 00000000..2953ac63
--- /dev/null
+++ b/remote/modules/vmchooser/module.conf.debian
@@ -0,0 +1,4 @@
+REQUIRED_INSTALLED_PACKAGES="
+ cmake
+ libqt4-dev
+"
diff --git a/remote/modules/vmchooser/module.conf.opensuse b/remote/modules/vmchooser/module.conf.opensuse
new file mode 100644
index 00000000..75cb7dd6
--- /dev/null
+++ b/remote/modules/vmchooser/module.conf.opensuse
@@ -0,0 +1,4 @@
+REQUIRED_INSTALLED_PACKAGES="
+ cmake
+ libqt4-devel
+"
diff --git a/remote/modules/vmchooser/module.conf.ubuntu b/remote/modules/vmchooser/module.conf.ubuntu
new file mode 100644
index 00000000..2953ac63
--- /dev/null
+++ b/remote/modules/vmchooser/module.conf.ubuntu
@@ -0,0 +1,4 @@
+REQUIRED_INSTALLED_PACKAGES="
+ cmake
+ libqt4-dev
+"