diff --git a/srcpkgs/cargo-flamegraph/template b/srcpkgs/cargo-flamegraph/template new file mode 100644 index 00000000000..73b1ef6cb52 --- /dev/null +++ b/srcpkgs/cargo-flamegraph/template @@ -0,0 +1,23 @@ +# Template file for 'cargo-flamegraph' +pkgname=cargo-flamegraph +version=0.6.2 +revision=1 +build_style=cargo +build_helper=qemu +depends="perf" +short_desc="Easy flamegraphs for Rust projects and everything else" +maintainer="reedts " +license="MIT, Apache-2.0" +homepage="https://github.com/flamegraph-rs/flamegraph" +distfiles="https://github.com/flamegraph-rs/flamegraph/archive/refs/tags/v${version}.tar.gz" +checksum=ec9626f8bc6e52b4c6ebbd5b35ac87f0e17e70ac1fd9eb5f26a8d7dd898f7911 + +post_install() { + vlicense LICENSE-MIT + + local flamegraph="${DESTDIR}/usr/bin/flamegraph" + for shell in bash fish zsh; do + vtargetrun ${flamegraph} --completions ${shell} > flamegraph.${shell} + vcompletion flamegraph.${shell} ${shell} flamegraph + done +}