63 lines
1.2 KiB
Bash
63 lines
1.2 KiB
Bash
# Copyright 2026 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
inherit shell-completion toolchain-funcs
|
|
|
|
DESCRIPTION="Command-line client for Proton Pass"
|
|
HOMEPAGE="
|
|
https://proton.me/pass
|
|
https://github.com/protonpass/pass-cli
|
|
"
|
|
SRC_URI="
|
|
amd64? (
|
|
https://proton.me/download/pass-cli/${PV}/pass-cli-linux-x86_64
|
|
-> ${P}-amd64
|
|
)
|
|
arm64? (
|
|
https://proton.me/download/pass-cli/${PV}/pass-cli-linux-aarch64
|
|
-> ${P}-arm64
|
|
)
|
|
"
|
|
S="${WORKDIR}"
|
|
|
|
LICENSE="GPL-3+"
|
|
SLOT="0"
|
|
KEYWORDS="-* ~amd64 ~arm64"
|
|
|
|
RDEPEND="
|
|
amd64? ( >=sys-libs/glibc-2.34 )
|
|
arm64? ( >=sys-libs/glibc-2.30 )
|
|
"
|
|
|
|
QA_PREBUILT="usr/bin/pass-cli"
|
|
|
|
src_unpack() {
|
|
cp "${DISTDIR}/${A}" pass-cli || die
|
|
chmod +x pass-cli || die
|
|
}
|
|
|
|
src_compile() {
|
|
if ! tc-is-cross-compiler; then
|
|
local shell
|
|
for shell in bash fish zsh; do
|
|
./pass-cli completions ${shell} > "${T}/pass-cli.${shell}" || die
|
|
done
|
|
else
|
|
ewarn "shell completion files were skipped due to cross-compilation"
|
|
fi
|
|
}
|
|
|
|
src_install() {
|
|
dobin pass-cli
|
|
|
|
newenvd - 50proton-pass-cli <<<"PROTON_PASS_NO_UPDATE_CHECK=1"
|
|
|
|
if ! tc-is-cross-compiler; then
|
|
newbashcomp "${T}"/pass-cli.bash pass-cli
|
|
newfishcomp "${T}"/pass-cli.fish pass-cli.fish
|
|
newzshcomp "${T}"/pass-cli.zsh _pass-cli
|
|
fi
|
|
}
|