# Maintainer: PktSurf <smlinux@pktsurf.in>
app=coreutils
version=8.32
build=3sml
homepage="https://www.gnu.org/software/coreutils/coreutils.html"
download="http://ftp.gnu.org/gnu/coreutils/coreutils-$version.tar.xz"
desc="Core GNU utilities"
requires="attr acl"

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

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

  applypatch $srcdir/ls.patch
}

build() {
  FORCE_UNSAFE_CONFIGURE=1 \
  LDFLAGS="-static" \
  ./configure \
    --prefix="" \
    --bindir=/bin \
    --libexecdir=/lib \
    --without-gmp

  make
  make install DESTDIR=$pkg 

  cp COPYING $pkgdocs/

  mkfinalpkg
}

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