# Maintainer: PktSurf <smlinux@pktsurf.in>
app=gawk
version=5.2.2
build=1sml
homepage="https://www.gnu.org/software/gawk/"
download="https://ftp.gnu.org/gnu/gawk/gawk-$version.tar.xz"
desc="POSIX-compliant pattern scanning and processing language"
requires="musl"

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

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

build() {
  LDFLAGS="-static" \
  ./configure \
    --prefix= \
    --libexecdir=/lib \
    --without-mpfr \
    --without-readline 

  make 
  make install DESTDIR=$pkg

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
90611e4daba7226d5ce8230843bf479dc71c0101740c005d851ef7c5b935b6cd4c42089b858abc1619adc05ed25fc7234f993690a76d2ea0b8e61bcbb7dc5a58  gawk-5.2.2.tar.xz
"