summaryrefslogtreecommitdiff
path: root/app-admin/bitwarden-cli-bin/bitwarden-cli-bin-2026.8.0.ebuild
blob: 889361de1febe6cc64c2fd9513d74947dabaa27c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=9

inherit shell-completion

DESCRIPTION="CLI client for Bitwarden compatible servers"
HOMEPAGE="https://github.com/bitwarden/clients/tree/main/apps/cli"

SRC_URI="
	amd64? ( https://github.com/bitwarden/clients/releases/download/cli-v${PV}/bw-oss-linux-${PV}.zip )
	arm64? ( https://github.com/bitwarden/clients/releases/download/cli-v${PV}/bw-oss-linux-arm64-${PV}.zip )
"

S="${WORKDIR}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="-* ~amd64 ~arm64"

# stripping breaks the binary. Errors:
# Pkg: Error reading from file.
RESTRICT='strip'

BDEPEND="app-arch/unzip"
QA_PREBUILT="usr/bin/bw"

src_compile() {
	./bw completion --shell zsh > bw.zsh 2> /dev/null || die
}

src_install() {
	dobin bw
	newzshcomp bw.zsh _bw
}