APP=lm-sensors
VERSION=3.3.5
BUILD=1sml
HOMEPAGE='https://github.com/lm-sensors/lm-sensors'
DESC="hardware sensors, voltages and fans monitoring package"
REQUIRES="perl"

build() {
  compileonlyfor x86_64
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION
  fixbuilddirpermissions

  patch -p1 < $SRCDIR/100-musl-compat.patch
  mkdir -p $PKG/bin $PKG/usr

  make PREFIX="" SBINDIR="$PKG/bin"
  make install PREFIX="" DESTDIR="$PKG" SBINDIR="/bin" MANDIR="/share/man"
  rmdir $PKG/usr

  cp COPYING* $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
1df470aa0f389d08d5e8c437a2c9b3362381f2673ded46a5e5e861982c2dae7e0ca039d595793465ef98886e02143233808d1bfc7046f7f5e41274b90d524569  lm-sensors-3.3.5.tar.lz
d587a556f9abdd8570f9848b0bfd081ff2bddea1c31cd63b77a36d5d33cdd8c70b967df6a2d20f8c323573dc49c36d9c571af0eeaf007c3eee4cdfa78787c151  100-musl-compat.patch
"
