# Template file for 'oksh'
pkgname=oksh
version=7.0
revision=2
build_style=gnu-configure
makedepends="ncurses-devel"
short_desc="Portable OpenBSD ksh, based on the Public Domain Korn Shell"
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
license="Public Domain"
homepage="https://github.com/ibara/oksh"
distfiles="https://github.com/ibara/oksh/releases/download/oksh-${version}/oksh-${version}.tar.gz"
checksum=21d5891f38ffea3a5d1aa8c494f0a5579c93778535e0a92275b102dec3221da1
register_shell="/bin/oksh"

alternatives="
 ksh:ksh:/usr/bin/oksh
 ksh:ksh.1:/usr/share/man/man1/oksh.1
 sh:sh:/usr/bin/oksh
 sh:sh.1:/usr/share/man/man1/oksh.1
"
build_options="static"

do_configure() {
	if [ "$build_option_static" ]; then
		./configure\
		--prefix=/usr\
		--enable-static\
		--enable-lto
	fi
}
