### this file is sourced not run

# source: BLFS 11.3
pkgname=zsh
PKGVER=5.9
PKGBUILD=1
PKGARCH=x86_64
TARBALL=$pkgname-$PKGVER.tar.xz
MD5SUM=182e37ca3fe3fa6a44f69ad462c5c30e
SRC_URL=https://sourceforge.net/projects/$pkgname/files/$pkgname/$PKGVER/$TARBALL/download
BUNDLE=

SLACKDESC="$pkgname: $pkgname $PKGVER (shell)
$pkgname: Zsh is a shell that has command-line editing, built-in spelling correction,
$pkgname: programmable command completion, shell functions (with autoloading), a history
$pkgname: mechanism, and a host of other features.
$pkgname:
$pkgname:
$pkgname:
$pkgname: Install optional docs http://www.zsh.org/pub{/old}?/zsh-$PKGVER-doc.tar.xz
$pkgname:
$pkgname: https://zsh.sourceforge.io/
$pkgname: https://www.zsh.org/
"
SLACKREQ='gdbm libpcap libpcre'

### default pkg_download
### default pkgـprepare
### default pkg_package
### build
pkg_build() {
	cd $(find /tmp/* -maxdepth 0 -type d ! -name pkg) &&

	CONFFLAGS="$CONFFLAGS \
	--prefix=/usr         \
	--sysconfdir=/etc/zsh \
	--enable-etcdir=/etc/zsh \
	--enable-cap          \
	--enable-gdbm         \
	--enable-pcre         \
	"
	# ./Util/preconfig && # only when pulled from git

	echo CONFFLAGS: "$CONFFLAGS"
	echo MAKEFLAGS: "$MAKEFLAGS"
	echo MAKEINSTALLFLAGS: "$MAKEINSTALLFLAGS"
	./configure $CONFFLAGS &&
	make $MAKEFLAGS &&
	makeinfo Doc/zsh.texi --html --no-split --no-headers -o Doc/zsh.html &&

	make $MAKEINSTALLFLAGS install &&
	make infodir=/usr/share/info install.info &&
	install -v -m755 -d           /usr/share/doc/zsh-5.8.1 &&
	install -v -m644 Doc/zsh.html /usr/share/doc/zsh-5.8.1 &&

	mkdir ../../install &&
	cp -v ../pkg/install/doinst.sh ../../install &&

	pkg_build_slackdesc
}

# vim:ft=sh:
