lure-repo/cockpit-sensors/lure.sh

34 lines
887 B
Bash
Raw Normal View History

2022-11-22 01:10:53 -06:00
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'
2022-11-22 01:47:36 -06:00
architectures=('all')
2022-11-22 01:10:53 -06:00
maintainer='SinTan1729'
license=('LGPL-2.1')
provides=()
conflicts=()
2023-01-14 08:30:16 -06:00
deps=('lm_sensors' 'cockpit')
2022-11-22 01:10:53 -06:00
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
2022-11-22 17:37:15 -06:00
echo "Pulling ${name} ${version}"
2022-11-22 01:10:53 -06:00
curl -L "https://github.com/${git_repo}/releases/latest/download/${name}.tar.xz" -o ${name}.tar.xz
# Build package
2022-11-22 17:37:15 -06:00
echo "Creating the package"
2022-11-22 01:10:53 -06:00
tar -xf ${name}.tar.xz ${name}/dist
# Binary
mkdir -p "${pkgdir}/usr/share/cockpit"
mv ${name}/dist "${pkgdir}/usr/share/cockpit/sensors"
# Notice
2022-11-22 17:37:15 -06:00
echo "Make sure to run sensors-detect"
2022-11-22 01:10:53 -06:00
}