void-packages/srcpkgs/arduino-cli/template

33 lines
1.0 KiB
Bash

# Template file for 'arduino-cli'
pkgname=arduino-cli
version=0.33.0
revision=2
build_style=go
build_helper="qemu"
go_import_path=github.com/arduino/arduino-cli
go_ldflags="-X ${go_import_path}/version.versionString=${version}"
short_desc="Arduino command line interface"
maintainer="Henry Naguski <henry@nilsu.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/arduino/arduino-cli"
distfiles="https://github.com/arduino/arduino-cli/archive/${version}.tar.gz"
checksum=5ee6a8b2e77573efb3f742f8007d9866c2d177c098794be7f03acc4a6128e616
case "$XBPS_TARGET_MACHINE" in
# the downloaded toolchains use glibc, this allows them to work on musl
*-musl) depends+=" gcompat" ;;
esac
post_build() {
arduino_cli=$(find $GOPATH/bin -name arduino-cli)
vtargetrun $arduino_cli completion bash > arduino.bash
vtargetrun $arduino_cli completion fish > arduino.fish
vtargetrun $arduino_cli completion zsh > arduino.zsh
}
post_install() {
vcompletion arduino.bash bash
vcompletion arduino.fish fish
vcompletion arduino.zsh zsh
}