From 9feb645feedb66412408b9562ccac74d86f6f822 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 1 Sep 2016 14:25:33 +0200 Subject: [dmidecode] New module: Compile on our own so we support 'em all The distro's dmidecode might be a little out of date and won't support all the latest hardware at all times. --- remote/modules/dmidecode/module.build | 27 +++++++++++++++++++++++++++ remote/modules/dmidecode/module.conf | 4 ++++ 2 files changed, 31 insertions(+) create mode 100644 remote/modules/dmidecode/module.build create mode 100644 remote/modules/dmidecode/module.conf (limited to 'remote/modules/dmidecode') diff --git a/remote/modules/dmidecode/module.build b/remote/modules/dmidecode/module.build new file mode 100644 index 00000000..1d58d03c --- /dev/null +++ b/remote/modules/dmidecode/module.build @@ -0,0 +1,27 @@ +#!/bin/bash + + +fetch_source() { + [ -d "${MODULE_DIR}/src/.git" ] && return 0 + rm -rf -- "${MODULE_DIR}/src" + git clone "${REQUIRED_GIT}" "${MODULE_DIR}/src" || perror "Could not create ${MODULE_DIR}/src" +} + +build() { + + # compilation + cd "${MODULE_DIR}/src" || perror "Could not cd to '${MODULE_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_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/remote/modules/dmidecode/module.conf b/remote/modules/dmidecode/module.conf new file mode 100644 index 00000000..3f58cff4 --- /dev/null +++ b/remote/modules/dmidecode/module.conf @@ -0,0 +1,4 @@ +REQUIRED_GIT="git://git.savannah.nongnu.org/dmidecode.git" +REQUIRED_BINARIES=" + dmidecode +" -- cgit v1.2.3-55-g7522