Diff doctl-1.79.0 with a doctl-9999
| /usr/portage/app-admin/doctl/doctl-9999.ebuild 2025-07-29 16:22:12.512447805 +0300 | ||
|---|---|---|
| 1 |
# Copyright 1999-2022 Gentoo Authors |
|
| 1 |
# Copyright 1999-2025 Gentoo Authors |
|
| 2 | 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 | 3 | |
| 4 | 4 |
EAPI=8 |
| 5 | 5 | |
| 6 |
inherit bash-completion-r1 edo go-module |
|
| 6 |
inherit edo git-r3 go-module shell-completion |
|
| 7 | 7 | |
| 8 | 8 |
DESCRIPTION="A command line tool for DigitalOcean services" |
| 9 | 9 |
HOMEPAGE="https://github.com/digitalocean/doctl" |
| 10 |
SRC_URI="https://github.com/digitalocean/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
| 10 |
EGIT_REPO_URI="https://github.com/digitalocean/${PN}.git"
|
|
| 11 | 11 | |
| 12 | 12 |
LICENSE="Apache-2.0 MIT BSD BSD-2 ISC MPL-2.0" |
| 13 | 13 |
SLOT="0" |
| 14 |
KEYWORDS="~amd64 ~x86" |
|
| 14 | ||
| 15 |
src_unpack() {
|
|
| 16 |
git-r3_src_unpack |
|
| 17 |
} |
|
| 15 | 18 | |
| 16 | 19 |
src_compile() {
|
| 17 |
LDFLAGS="-X github.com/digitalocean/doctl.Major=$(ver_cut 1) |
|
| 18 |
-X github.com/digitalocean/doctl.Minor=$(ver_cut 2) |
|
| 19 |
-X github.com/digitalocean/doctl.Patch=$(ver_cut 3-) |
|
| 20 |
-X github.com/digitalocean/doctl.Label=release" |
|
| 20 |
LDFLAGS="-X github.com/digitalocean/doctl.Build=$(git rev-parse --short HEAD) |
|
| 21 |
-X github.com/digitalocean/doctl.Label=dev" |
|
| 21 | 22 |
GOFLAGS="-v -x -mod=vendor" ego build -ldflags "$LDFLAGS" ./cmd/... |
| 22 | 23 | |
| 23 | 24 |
local completion |
| ... | ... | |
| 28 | 29 |
} |
| 29 | 30 | |
| 30 | 31 |
src_test() {
|
| 31 |
GOFLAGS="-v -x -mod=vendor" ego test -work ./do/... ./pkg/... . |
|
| 32 |
GOFLAGS="-v -x -mod=vendor" ego test -work ./commands/... ./do/... \ |
|
| 33 |
./pkg/... ./internal/... . |
|
| 32 | 34 |
} |
| 33 | 35 | |
| 34 | 36 |
src_install() {
|
| ... | ... | |
| 36 | 38 |
dobin doctl |
| 37 | 39 | |
| 38 | 40 |
newbashcomp doctl.bash doctl |
| 39 |
insinto /usr/share/zsh/site-functions |
|
| 40 |
newins doctl.zsh _doctl |
|
| 41 |
insinto /usr/share/fish/completion |
|
| 42 |
newins doctl.fish doctl |
|
| 41 |
newfishcomp doctl.fish doctl |
|
| 42 |
newzshcomp doctl.zsh _doctl |
|
| 43 | 43 |
} |