#!/bin/sh -ue
NAME=awk
VERSION=git
RELEASE=1
SOURCE="https://github.com/onetrueawk/awk.git"

build() {
	msg "building awk..."
	gmake -j"$NPROC" \
		CC="${CC:-cc} -static" \
		HOSTCC="${CC:-cc} -static" \
		CFLAGS="-O2" \
		YACC="yacc -d -b awkgram" || die "make failed"

	msg "installing awk..."
	mkdir -p "$PKG/$PREFIX/bin" "$PKG/$PREFIX/share/man/man1"
	install -m 755 a.out "$PKG/$PREFIX/bin/awk"
	install -m 644 awk.1 "$PKG/$PREFIX/share/man/man1/awk.1"
}

. ${0%/*}/../../libsh/libdmake.sh
