# Maintainer: PktSurf <smlinux@pktsurf.in>
app=lm-sensors
version=3.6.0
mversion="$(echo $version | sed 's@.@_@')"
build=1sml
homepage="https://github.com/lm-sensors/lm-sensors"
download="https://github.com/lm-sensors/lm-sensors/archive/V$mversion/lm-sensors-$mversion.tar.gz"
desc="hardware sensors, voltages and fans monitoring package"
requires="perl"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions
}

build() {
  make PREFIX= SBINDIR=/bin BUILD_STATIC_LIB=0
  make install PREFIX= DESTDIR="$pkg" SBINDIR=bin MANDIR=share/man BUILD_STATIC_LIB=0

  cp COPYING* $pkgdocs/

  mv $pkg/etc/sensors3.conf $pkg/etc/sensors3.conf.new

  mkfinalpkg
}

sha512sums="
7f08bff02d855abb5ea0dd225e79aa0f5ecd0745270a7ef5939a46568a78a847fa0c8367b690185d041ffe40c79c5ec47d6b313430b65934985ef7e028346676  lm-sensors-3.6.0.tar.lz
"
