# Template file for 'doctl'
pkgname=doctl
version=1.166.0
revision=1
build_style=go
go_import_path="github.com/digitalocean/doctl"
go_package="${go_import_path}/cmd/doctl"
_maj_min=${version%*.*}
_major=${_maj_min%.*}
_minor=${_maj_min#*.}
_patch=${version#*.*.*}
go_ldflags="-X github.com/digitalocean/doctl.Major=$_major -X github.com/digitalocean/doctl.Minor=$_minor -X github.com/digitalocean/doctl.Patch=$_patch -X github.com/digitalocean/doctl.Label=voidlinux"
# TestUserAgent/dev_version fails because the version string carries Label=voidlinux suffix instead of "-dev"
# TestRunAppsDevConfigSet & Unset require a git checkout, not contained in src tarball
make_check_args="-skip TestUserAgent/dev_version|TestRunAppsDevConfigSet|TestRunAppsDevConfigUnset"
short_desc="Command line tool for DigitalOcean services"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://github.com/digitalocean/doctl"
changelog="https://github.com/digitalocean/doctl/releases"
distfiles="https://github.com/digitalocean/doctl/archive/v${version}.tar.gz"
checksum=6a8c7ea59105f6274be9efeda947c275cd64b0e1f9f3112c9b2d6385d7994007

# contains tests with int, causes overflow on 32-bit targets
if [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then
	make_check_args+="|TestRun/doctl/compute/reserved-ipv6-action|TestActivationsList/multiple_flags_and_arg"
fi
