# Maintainer: Developer <dev@opalos.org>
# Maintainer: Developer <dev@opalos.org>

pkgname=grml-zsh-config
pkgver=%version%
pkgrel=%release%
pkgdesc="grml's zsh setup"
arch=('any')
url='https://grml.org/zsh/'
license=('GPL2')
provides=('grmlzshrc')
depends=('zsh' 'coreutils' 'grep' 'sed' 'procps')
makedepends=('txt2tags')
source=("https://deb.grml.org/pool/main/g/grml-etc-core/grml-etc-core_${pkgver}.tar.gz")
sha256sums=('1db01be33c9dd6aa62ab0982e2a566161ab7c474ee99466bfe89f34b642cb393')

build() {
	cd "${srcdir}/grml-etc-core-${pkgver}/doc"
	make
}

package() {
	cd "${srcdir}/grml-etc-core-${pkgver}"
	install -D -m644 etc/skel/.zshrc "${pkgdir}/etc/skel/.zshrc"
	install -D -m644 etc/zsh/keephack "${pkgdir}/etc/zsh/keephack"
	install -D -m644 etc/zsh/zshrc "${pkgdir}/etc/zsh/zshrc"

	install -D -m644 doc/grmlzshrc.5 "${pkgdir}/usr/share/man/man5/grmlzshrc.5"
	ln -sf grmlzshrc.5.gz "${pkgdir}/usr/share/man/man5/grml-zsh-config.5.gz"
}
