# Template file for 'zola'
pkgname=zola
version=0.20.0
revision=1
build_style=cargo
build_helper=qemu
hostmakedepends="pkg-config"
makedepends="oniguruma-devel"
short_desc="Fast opinionated static site generator"
maintainer="tranzystorekk <tranzystorek.io@protonmail.com>"
license="MIT"
homepage="https://github.com/getzola/zola"
changelog="https://raw.githubusercontent.com/getzola/zola/master/CHANGELOG.md"
distfiles="https://github.com/getzola/zola/archive/refs/tags/v${version}.tar.gz"
checksum=ed0274b4139e5ebae1bfac045a635d952e50dc238fdc39cb730b032167f8bb4a

post_install() {
	for shell in bash fish zsh; do
		vtargetrun ${DESTDIR}/usr/bin/zola completion ${shell} > zola.${shell}
		vcompletion zola.${shell} ${shell}
	done

	vlicense LICENSE

	ln -s zola ${DESTDIR}/usr/bin/gutenberg
}

gutenberg_package() {
	depends="zola-${version}_${revision}"
	short_desc="Transition package for Zola"
	pkg_install() {
		vmove usr/bin/gutenberg
	}
}
