# Maintainer: PktSurf <smlinux@pktsurf.in>
app=sysstat
version=12.5.5
build=2sml
homepage="http://sebastien.godard.pagesperso-orange.fr/"
download="http://pagesperso-orange.fr/sebastien.godard/sysstat-$version.tar.xz"
desc="System performance monitoring tools"
requires="musl kernel-headers"

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

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version 
  rm -rf tests/root* 
  fixbuilddirpermissions
}

build() {
  # One of the configure checks automatically adds "lib64" if the system is 64bit and causes some files 
  # to be installed inside /lib64. We don't need that on musl.
  sed -i 's@lib64@lib@g' configure

  ./configure \
    --prefix="/"

  make
  make install DESTDIR=$pkg 

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
bcad825eb5405d8999f3212934b41a319ad49754312f168c3b58bf38aaeb17fbed8cf44f4c91eec410edfa31bc7b82c11b3e7dc23a8e310ecbb30a8e00bb1b3d  sysstat-12.5.5.tar.lz
"
