# Maintainer: PktSurf <smlinux@pktsurf.in>
app=smartmontools
version=6.5
build=2sml
homepage="http://smartmontools.sourceforge.net"
download="https://sourceforge.net/projects/smartmontools/files/smartmontools/$version/smartmontools-$version.tar.gz"
desc="monitoring utilities for hard drives using SMART protocol"
requires="musl"

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

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

build() {
  ./configure \
    --prefix= \
    --sysconfdir=/etc \
    --sbindir=/bin \
    --with-initscriptdir=no

  make
  make install DESTDIR=$pkg

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

  preprunitservice -s smartd -d

  mkfinalpkg
}

sha512sums="
3ae0cf5eb6afb0a7630496575709fb8ad41b7692f1b2a544ba4a539b6d01e01a1a62b1b73132e4b3d2981f1b8b717c9cbd5037a86a1aae1031640d5cf096417c  smartmontools-6.5.tar.lz
"
