# Template file for 'taplo'
pkgname=taplo
version=0.10.0
revision=1
build_style=cargo
build_wrksrc="crates/taplo-cli"
build_helper="qemu"
# no-default-features: allows selecting custom feature set
# completions: enables completion script generation
# lint: adds a linter subcommand
# lsp: builds TOML language server
# native-tls: Enables linking against system SSL instead of rustls/ring
configure_args="--no-default-features --features completions,lint,lsp,native-tls"
hostmakedepends="pkg-config"
makedepends="openssl-devel"
short_desc="TOML toolkit written in Rust"
maintainer="cinerea0 <cinerea0@protonmail.com>"
license="MIT"
homepage="https://taplo.tamasfe.dev/"
changelog="https://raw.githubusercontent.com/tamasfe/taplo/master/crates/taplo-cli/CHANGELOG.md"
distfiles="https://github.com/tamasfe/taplo/archive/refs/tags/release-taplo-cli-${version}.tar.gz"
checksum=eaec8435bfb5ccd89f7b4dd09385b6be25c2ff00aa25417cb82c88a59d4ccde0

post_install() {
	vlicense ../../LICENSE

	for _shell in bash fish zsh; do
		vtargetrun ${DESTDIR}/usr/bin/taplo completions ${_shell} > taplo.${_shell}
		vcompletion taplo.${_shell} ${_shell}
	done
}
