mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-08 10:52:03 +01:00
dev-db/etcd: add etcdctl useflag
This paves the way to including the etcdctl binary from another package. See https://github.com/coreos/bugs/issues/1717 for some context around this. As discussed on that issue, a long term solution here might be torcx. However, I don't think we need to actually wait for torcx to do this since the etcd3 cli is meant to be perfectly backwards compatible. This will also allow our docs around using `etcd-member.service` to be more readable/usable, since right now the docs don't have an easy way to talk to the etcd cluster from a Contaienr Linux machine.
This commit is contained in:
parent
13859ff549
commit
e10e068084
@ -25,19 +25,19 @@ SRC_URI=""
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="2"
|
||||
IUSE=""
|
||||
IUSE="+etcdctl"
|
||||
|
||||
RDEPEND="!dev-db/etcd:0
|
||||
!dev-db/etcdctl"
|
||||
etcdctl? ( !dev-db/etcdctl )"
|
||||
|
||||
src_compile() {
|
||||
GO_LDFLAGS="-X ${COREOS_GO_PACKAGE}/version.GitSHA=${CROS_WORKON_COMMIT:0:7}"
|
||||
go_build "${COREOS_GO_PACKAGE}"
|
||||
go_build "${COREOS_GO_PACKAGE}/etcdctl"
|
||||
use etcdctl && go_build "${COREOS_GO_PACKAGE}/etcdctl"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin ${WORKDIR}/gopath/bin/etcdctl
|
||||
use etcdctl && dobin ${WORKDIR}/gopath/bin/etcdctl
|
||||
newbin "${WORKDIR}/gopath/bin/${PN}" "${PN}${SLOT}"
|
||||
|
||||
systemd_dounit "${FILESDIR}/${PN}${SLOT}.service"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user