# Template file for 'mdBook'
pkgname=mdBook
version=0.5.2
revision=1
build_style=cargo
build_helper=qemu
short_desc="Create book from markdown files. Like Gitbook but implemented in Rust"
maintainer="Érico Nogueira <ericonr@disroot.org>"
license="MPL-2.0"
homepage="https://github.com/rust-lang/mdBook"
changelog="https://raw.githubusercontent.com/rust-lang/mdBook/master/CHANGELOG.md"
distfiles="https://github.com/rust-lang/mdBook/archive/refs/tags/v${version}.tar.gz"
checksum=2c8615a17c5670f9aa6d8dbf77c343cf430f95f571f28a87bb7aaa8f29c1ac5b

post_install() {
	vlicense LICENSE

	for completion in bash fish zsh; do
		vtargetrun $DESTDIR/usr/bin/mdbook completions $completion > mdbook.$completion
		vcompletion mdbook.$completion $completion
	done
}
