38 lines
1.2 KiB
Bash
38 lines
1.2 KiB
Bash
# Template file for 'arduino-cli'
|
|
pkgname=arduino-cli
|
|
version=1.2.0
|
|
revision=1
|
|
build_style=go
|
|
build_helper="qemu"
|
|
go_import_path=github.com/arduino/arduino-cli
|
|
go_ldflags="
|
|
-X ${go_import_path}/internal/version.versionString=${version}
|
|
-X ${go_import_path}/internal/version.commit=v${version}
|
|
-X ${go_import_path}/internal/version.date=${SOURCE_DATE_EPOCH}
|
|
"
|
|
short_desc="Arduino command line interface"
|
|
maintainer="Andrew J. Hesford <ajh@sideband.org>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="https://github.com/arduino/arduino-cli"
|
|
distfiles="https://github.com/arduino/arduino-cli/archive/v${version}.tar.gz"
|
|
checksum=f576e40873037e39cdd1a8297b34aa8305b53e2268307944765778a925dba0f1
|
|
# Tests do not find executable in build environment
|
|
make_check=no
|
|
|
|
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
|
|
}
|