# Template file for 'zellij'
pkgname=zellij
version=0.44.3
revision=1
build_style=cargo
build_helper=qemu
configure_args="--no-default-features --features=plugins_from_target,web_server_capability"
hostmakedepends="pkg-config"
makedepends="libcurl-devel sqlite-devel"
checkdepends="libssh2-devel"
short_desc="Terminal workspace with batteries included"
maintainer="tranzystorekk <tranzystorek.io@protonmail.com>"
license="MIT"
homepage="https://zellij.dev"
changelog="https://raw.githubusercontent.com/zellij-org/zellij/main/CHANGELOG.md"
distfiles="https://github.com/zellij-org/zellij/archive/refs/tags/v${version}.tar.gz"
checksum=33ae61fc802b59462fed49b424893596d3aa819646bdce53d5602f714c1264fe
make_check_pre="env LIBSSH2_SYS_USE_PKG_CONFIG=1"

post_install() {
	vdoc README.md
	vinstall assets/zellij.desktop 644 usr/share/applications
	vlicense LICENSE.md

	for shell in bash fish zsh; do
		vtargetrun "${DESTDIR}/usr/bin/zellij" setup --generate-completion ${shell} > zellij.${shell}
		vcompletion zellij.${shell} ${shell}
	done
}
