app=keyutils
version=1.6.3
build=1sml
homepage="http://people.redhat.com/~dhowells/keyutils/"
desc="Kernel key management utilities"
requires="musl"

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

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

  make -j1 NO_ARLIB=1 \
    LIBDIR=/lib \
    USRLIBDIR=/lib \
    SBINDIR=/bin \
    MANDIR=/share/man \
    SHAREDIR=/share \
    INCLUDEDIR=/include \
    version="$version" \
    RELEASE="-r0" \
    CFLAGS="$CFLAGS"

  make -j1 NO_ARLIB=1 \
    LIBDIR=/lib \
    USRLIBDIR=/lib \
    SBINDIR=/bin \
    MANDIR=/share/man \
    SHAREDIR=/share \
    INCLUDEDIR=/include \
    install DESTDIR=$pkg 

  cp LICENCE* $pkgdocs/

  mkfinalpkg
}

sha512sums="
8923df8535000a47a8b85f3152bf0e3e4c0ad7f5a67804b22e15838c9ac52610d83113261e034f873b6d532cea8d710e8faace833fb9c5b5bb0a1b603126b4dc  keyutils-1.6.3.tar.lz
"
