From a263b974af126ae30c33e8b6b9d74d2465a7bfa3 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Tue, 22 Nov 2022 01:10:53 -0600 Subject: [PATCH] Added cockpit-sensors --- cockpit-sensors/lure.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 cockpit-sensors/lure.sh diff --git a/cockpit-sensors/lure.sh b/cockpit-sensors/lure.sh new file mode 100644 index 0000000..7b0b28f --- /dev/null +++ b/cockpit-sensors/lure.sh @@ -0,0 +1,34 @@ +name='cockpit-sensors' +version=VERSION +release=1 +desc='A cockpit module that displays all data reported by lm-sensors' +homepage='https://github.com/ocristopfer/cockpit-sensors' +architectures=('amd64') +maintainer='SinTan1729' +license=('LGPL-2.1') +provides=() +conflicts=() +deps=('lm-sensors') +git_repo='ocristopfer/cockpit-sensors' + +sources=() +checksums=() + +version() { + printf "$(curl -sL "https://api.github.com/repos/${git_repo}/releases/latest" | jq -r '.tag_name')" +} + +package() { + # Pull sources + echo Pulling ${name} ${version} + curl -L "https://github.com/${git_repo}/releases/latest/download/${name}.tar.xz" -o ${name}.tar.xz + # Build package + echo Creating the package + tar -xf ${name}.tar.xz ${name}/dist + # Binary + mkdir -p "${pkgdir}/usr/share/cockpit" + mv ${name}/dist "${pkgdir}/usr/share/cockpit/sensors" + # Notice + echo Make sure to run sensors-detect +} + \ No newline at end of file