diff options
Diffstat (limited to 'core/modules/dmidecode')
-rw-r--r-- | core/modules/dmidecode/module.build | 27 | ||||
-rw-r--r-- | core/modules/dmidecode/module.conf | 4 |
2 files changed, 31 insertions, 0 deletions
diff --git a/core/modules/dmidecode/module.build b/core/modules/dmidecode/module.build new file mode 100644 index 00000000..f37536af --- /dev/null +++ b/core/modules/dmidecode/module.build @@ -0,0 +1,27 @@ +#!/bin/bash + + +fetch_source() { + [ -d "${MODULE_WORK_DIR}/src/.git" ] && return 0 + rm -rf -- "${MODULE_WORK_DIR}/src" + git clone "${REQUIRED_GIT}" "${MODULE_WORK_DIR}/src" || perror "Could not create ${MODULE_WORK_DIR}/src" +} + +build() { + + # compilation + cd "${MODULE_WORK_DIR}/src" || perror "Could not cd to '${MODULE_WORK_DIR}/src'. Did fetch_source work?" + + make || perror "Could not compile dmidecode using 'make'." + + # NO MAKE INSTALL: Copy to build dir, since there are no shared libs linked in + mkdir -p "${MODULE_BUILD_DIR}/usr/sbin" + cp "${MODULE_WORK_DIR}/src/dmidecode" "${MODULE_BUILD_DIR}/usr/sbin/" || perror "Could not copy dmidecode binary to ${MODULE_BUILD_DIR}" + + cd - &>/dev/null +} + +post_copy() { + : +} + diff --git a/core/modules/dmidecode/module.conf b/core/modules/dmidecode/module.conf new file mode 100644 index 00000000..3f58cff4 --- /dev/null +++ b/core/modules/dmidecode/module.conf @@ -0,0 +1,4 @@ +REQUIRED_GIT="git://git.savannah.nongnu.org/dmidecode.git" +REQUIRED_BINARIES=" + dmidecode +" |