app-crypt/sops: update ebuild

This commit is contained in:
odrling 2024-03-21 21:36:55 +01:00
parent e1e58ae5e7
commit 8154427bc1
Signed by: odrling
GPG Key ID: 2D8C2F151EDB7392
2 changed files with 23 additions and 28 deletions

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>florianbadie@odrling.xyz</email>
<name>odrling</name>
</maintainer>
<upstream>
<remote-id type="github">getsops/sops</remote-id>
</upstream>
</pkgmetadata>

View File

@ -1,49 +1,33 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
if [[ ${PV} == "9999" ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/mozilla/${PN}.git"
#KEYWORDS=""
RESTRICT="network-sandbox"
else
SRC_URI="
https://github.com/mozilla/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://hikari.butaishoujo.moe/b/67314ee3/${P}-vendor.tar.xz
"
KEYWORDS="~amd64 ~arm ~arm64"
RESTRICT="mirror"
fi
DESCRIPTION="Simple and flexible tool for managing secrets"
HOMEPAGE="https://github.com/mozilla/sops"
HOMEPAGE="https://github.com/getsops/sops"
SRC_URI="
https://github.com/getsops/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://hikari.butaishoujo.moe/b/67314ee3/${P}-vendor.tar.xz
"
LICENSE="MPL-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64"
RESTRICT="mirror"
DOCS=( {CHANGELOG,README}.rst )
if [[ ${PV} == "9999" ]]; then
src_unpack() {
git-r3_src_unpack
go-module_live_vendor
}
fi
src_compile() {
CGO_ENABLED=0 \
go build -v -ldflags "-s -w" -o "${PN}" ./cmd/sops
ego build
}
src_test() {
go test -work || die "test failed"
ego test || die "test failed"
}
src_install() {
einstalldocs
dobin ${PN}
dobin sops
}