gentoo/dev-db/influx-cli/influx-cli-2.7.5-r1.ebuild
David Roman 9c797d6dab
dev-db/influx-cli: fix bash completion collision
Closes: https://bugs.gentoo.org/950388
Signed-off-by: David Roman <davidroman96@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40836
Signed-off-by: John Helmert III <ajak@gentoo.org>
2025-03-01 10:54:32 -08:00

37 lines
916 B
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module shell-completion
MY_PV="${PV/_rc/-rc.}"
DESCRIPTION="The command line for influxdb"
HOMEPAGE="https://github.com/influxdata/influx-cli"
SRC_URI="https://github.com/influxdata/influx-cli/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://gentoo.kropotkin.rocks/go-pkgs/${P}-vendor.tar.xz"
LICENSE="Apache-2.0 BSD BSD-2 MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
# Previous versions ship they own client
DEPEND="!<dev-db/influxdb-2.0.0"
RDEPEND="${DEPEND}"
src_compile() {
unset LDFLAGS
emake
cd bin/$(go env GOOS)/$(go env GOARCH)/ || die
./influx completion zsh > influx-completion.zsh || die
}
src_install() {
cd bin/$(go env GOOS)/$(go env GOARCH) || die
dobin influx
# bash ones are provided by bash-completion package
newzshcomp influx-completion.zsh _influx
}