app=sysstat
version=12.5.5
build=1sml
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"

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

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

  # 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="/" \
    --sysconfdir=/etc \
    --disable-nls 

  make
  make install DESTDIR=$pkg 

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
1a51f4942d7e1752c452d1d4dbd6a1034d5a5d42be536826ea5b83cd911ab4c1f4d64fd54f569c0f7b4fd5480dcc04b16e41172401612bf4069179b78335d14d  sysstat-12.5.5.tar.xz
"
