View Raw Ebuild
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
EGO_SUM=(
"github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod"
"github.com/boombuler/barcode v1.0.1"
"github.com/boombuler/barcode v1.0.1/go.mod"
"github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod"
"github.com/davecgh/go-spew v1.1.0"
"github.com/davecgh/go-spew v1.1.0/go.mod"
"github.com/inconshreveable/mousetrap v1.0.1"
"github.com/inconshreveable/mousetrap v1.0.1/go.mod"
"github.com/pmezard/go-difflib v1.0.0"
"github.com/pmezard/go-difflib v1.0.0/go.mod"
"github.com/pquerna/otp v1.4.0"
"github.com/pquerna/otp v1.4.0/go.mod"
"github.com/russross/blackfriday/v2 v2.1.0/go.mod"
"github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e"
"github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod"
"github.com/spf13/cobra v1.6.1"
"github.com/spf13/cobra v1.6.1/go.mod"
"github.com/spf13/pflag v1.0.5"
"github.com/spf13/pflag v1.0.5/go.mod"
"github.com/stretchr/objx v0.1.0/go.mod"
"github.com/stretchr/testify v1.3.0"
"github.com/stretchr/testify v1.3.0/go.mod"
"gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod"
"gopkg.in/yaml.v3 v3.0.1/go.mod"
)
go-module_set_globals
DESCRIPTION="Time-Based One-Time Password Code Generator"
HOMEPAGE="https://github.com/arcanericky/totp"
SRC_URI="https://github.com/arcanericky/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
${EGO_SUM_SRC_URI}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
src_compile() {
ego build -ldflags="-X github.com/arcanericky/totp/cmd.versionText=${PV} -s -w" \
-o ./bin/"${PN}" ./cmd/totp
}
src_test() {
ego test -work ./...
}
src_install() {
einstalldocs
dobin bin/totp
}