diff options
| author | Michael Pereira Neves | 2014-03-31 21:14:19 +0200 |
|---|---|---|
| committer | Michael Pereira Neves | 2014-03-31 21:14:19 +0200 |
| commit | c68cfbfde55cf8565ba186dd60f2065e2269650a (patch) | |
| tree | 6dbe7a31e0d943c968fad644f653effc903ae9b7 /remote/modules/vmchooser/module.build | |
| parent | [brazilian] add brazilian locale and keymaps (diff) | |
| parent | [vbox] re-set permissions: openslx/script entries (diff) | |
| download | tm-scripts-c68cfbfde55cf8565ba186dd60f2065e2269650a.tar.gz tm-scripts-c68cfbfde55cf8565ba186dd60f2065e2269650a.tar.xz tm-scripts-c68cfbfde55cf8565ba186dd60f2065e2269650a.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/modules/vmchooser/module.build')
| -rw-r--r-- | remote/modules/vmchooser/module.build | 36 |
1 files changed, 36 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() { + : +} + |
