app-crypt/step-cli - 9999 (nest)

Search

Install

Install this version:

emerge -a =app-crypt/step-cli-9999

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =app-crypt/step-cli-9999

Or alternatively:

emerge --autounmask-write -a =app-crypt/step-cli-9999

Package Information

Description:
A zero trust swiss army knife for working with X509
Homepage:
https://github.com/smallstep/cli
License:
Apache-2.0

Ebuild Details

Version EAPI Keywords Slot
9999 8 0
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit edo git-r3 go-module readme.gentoo-r1 shell-completion systemd tmpfiles

DESCRIPTION="A zero trust swiss army knife for working with X509"
HOMEPAGE="https://github.com/smallstep/cli"
EGIT_REPO_URI="https://github.com/smallstep/cli.git"

LICENSE="Apache-2.0"
SLOT="0"
IUSE="+client test"
RESTRICT="test" # 1 test fails

RDEPEND="acct-group/step
	acct-user/step"
BDEPEND="test? ( dev-go/gotestsum )"

DOCS=( {CHANGELOG,README}.md )

DOC_CONTENTS="Run 'env-update && source /etc/profile' to\\n
export STEPPATH envvar, after that you can init CA via\\n
'step-cli ca init' into /etc/step directory.\\n\\n"

src_unpack() {
	git-r3_src_unpack
	go-module_live_vendor
}

src_compile() {
	DATE="$(date -u '+%Y-%m-%d-%H%M UTC')"
	LDFLAGS="-w -X main.Version=${PV} -X \"main.BuildTime=${DATE}\""

	ego build -ldflags "${LDFLAGS}" -o step-cli ./cmd/...

	unset STEPPATH
	local completion
	for completion in bash fish zsh ; do
		edo ./step-cli completion ${completion} > step-cli.${completion}
		edo sed -i "s/step/step-cli/g" step-cli.${completion}
	done
}

src_test() {
	edo gotestsum ./...
}

src_install() {
	einstalldocs
	! use client && readme.gentoo_create_doc

	dobin step-cli
	! use client && doenvd "${FILESDIR}"/99step-cli
	systemd_dounit systemd/{cert-renewer@,ssh-cert-renewer}.service \
		systemd/cert-renewer.target systemd/{cert-renewer@,ssh-cert-renewer}.timer
	newinitd "${FILESDIR}"/step-cli.initd step-cli
	newconfd "${FILESDIR}"/step-cli.confd step-cli
	newtmpfiles "${FILESDIR}"/step-cli.tmpfile step-cli.conf

	newbashcomp step-cli.bash step-cli
	newfishcomp step-cli.fish step-cli
	newzshcomp step-cli.zsh _step-cli
}

pkg_postinst() {
	! use client && readme.gentoo_print_elog
	tmpfiles_process step-cli.conf
}

USE Flags

Manage flags for this package: euse -i <flag> -p app-crypt/step-cli | euse -E <flag> -p app-crypt/step-cli | euse -D <flag> -p app-crypt/step-cli

Global/Standard Flags

client
Default: Enabled (+)

Inherited Eclasses

edo

Dependencies

RDEPEND

acct-group/step
	acct-user/step

BDEPEND

test? ( dev-go/gotestsum )