APP=coreutils
VERSION=8.32
BUILD=1sml
HOMEPAGE='https://www.gnu.org/software/coreutils/coreutils.html'
DOWNLOAD='http://ftp.gnu.org/gnu/coreutils/coreutils-8.32.tar.xz'
DESC="Core GNU utilities"
REQUIRES="attr acl"

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

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

  patch -p1 < $SRCDIR/ls.patch

  FORCE_UNSAFE_CONFIGURE=1 \
  CFLAGS="$CFLAGS -static" \
  ./configure \
    --prefix="" \
    --bindir=/bin \
    --libexecdir=/lib \
    --without-gmp \
    --disable-nls 

  make
  make install DESTDIR=$PKG 

  cp COPYING $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
e4473c87948904b017fef23d1c81cafdf0d6d282cd6dd9d402d3dc718642f392029933cd7b161f73d6b69523ca12458066ba2804201a1ce256da753fa521f54c  coreutils-8.32.tar.lz
2742d74c45bdb52c524d415fb0787ed63164aec2c22980a1c46b40b7db2f0911008161b1219d5b571cc25de274bacc20c8be3f651906967a032a3ac9859cffce  ls.patch
"
