# zsh - the Arctic login shell, configured out of the box.
name=zsh
version=5.9.2
release=1
desc="The Z shell, Arctic's default login shell"
url="https://www.zsh.org/"
license="MIT-Modern-Variant"
depend="glibc netbsd-curses"
makedepend="clang lld"
source="https://www.zsh.org/pub/zsh-$version.tar.xz"
sha256="SKIP"

build() {
	cd "zsh-$version"
	./configure --prefix=/usr --sysconfdir=/etc \
		--enable-etcdir=/etc/zsh \
		--enable-fndir=/usr/share/zsh/functions \
		--enable-site-fndir=/usr/local/share/zsh/site-functions \
		--enable-multibyte \
		--with-tcsetpgrp \
		--disable-gdbm \
		--enable-zsh-secure-free
	make -j"$JOBS"
}

package() {
	cd "zsh-$version"
	make DESTDIR="$pkgdir" install
	# zsh is a login shell, so it has to be listed as one.
	install -d "$pkgdir/etc"
	printf '/bin/zsh\n/usr/bin/zsh\n' >"$pkgdir/etc/shells"
}
