Files
gentoo-zh/app-crypt/cotp/cotp-9999.ebuild
T
Zakk 0e8956e011 app-crypt/cotp: run cargo_live_src_unpack in ${S}
cargo_live_src_unpack no longer changes to ${S} since ::gentoo commit 0ed513f46179
("cargo.eclass: cargo_live_src_unpack don't cd to ${S}"), so cargo fetch ran in
${WORKDIR}, found no Cargo.toml and died in src_unpack.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-11-11 19:28:15 +11:00

60 lines
1020 B
Bash

EAPI=8
CRATES=""
RUST_MIN_VER="1.89.0"
inherit cargo
DESCRIPTION="command-line TOTP/HOTP authenticator app"
HOMEPAGE="https://github.com/replydev/cotp"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/replydev/cotp.git"
else
SRC_URI="
https://github.com/replydev/cotp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/huaji2369/ebuild-crate-dist-replydev-cotp/releases/download/v${PV}/${P}-crates.tar.xz
${CARGO_CRATE_URIS}
"
KEYWORDS="~amd64 ~arm64"
fi
LICENSE="GPL-3"
# Dependent crate licenses
LICENSE+="
Apache-2.0
Boost-1.0
ISC
MIT
MPL-2.0
Unicode-3.0
Unicode-DFS-2016
WTFPL-2
ZLIB
"
SLOT="0"
IUSE="converter"
RDEPEND="
x11-libs/libxcb
x11-libs/libxkbcommon
"
DEPEND="${RDEPEND}"
src_unpack() {
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
cd "${S}" || die
cargo_live_src_unpack
else
cargo_src_unpack
fi
}
src_install() {
cargo_src_install
use converter && (
insinto "/usr/share/${P}/converters/"
doins -r converters/
)
}