#!/bin/sh

#shellcheck disable=SC2034
#shellcheck disable=SC2154
#shellcheck disable=SC2086

#ebs.formulae
ebsver=1

pkgname=gawk
pkgver=5.4.1
pkgsrc=https://ftp.gnu.org/gnu/gawk/gawk-$pkgver.tar.xz
pkgchecksum=sha256:07f6f7342b7febe4313fc2c2542ad93d64fe20ad8717200109f105a826f5fd37
pkgdesc="GNU implementation of the awk programming language"
pkgmaintainer="juanvel400 <me@juanvel400.com>"
pkglicense="GPL-3.0-or-later"
pkghomepage="https://www.gnu.org/software/gawk"
pkgcheck=true
pkgdeps="musl"

build() {
    ./configure ${CONFIGUREFLAGS:-} --prefix=/usr --disable-rpath --enable-year2038
    make
}

check() {
    make check
}

package() {
    "${1:-fakeroot}" make install DESTDIR="$pkgdir"
}
