APP=which
VERSION=2.21
BUILD=1sml
HOMEPAGE="https://savannah.gnu.org/projects/which/"
DOWNLOAD="http://ftp.gnu.org/gnu/which/which-2.21.tar.gz"
DESC="shows the full path to shell commands"
REQUIRES="musl"

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

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

  CFLAGS="-O2 -static" \
  ./configure \
    --prefix=""

  make
  make install DESTDIR=$PKG

  cp COPYING $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
467993862114fda14ee25b3a504cd843a9c3f70ded2345d47f2274fe85124215e2d17a463fd520cacf14b7478a7fd12700cbff999d2c7ba11e1e4afc3fb5a8d7  which-2.21.tar.lz
"
