app-crypt/lego: add 4.28.1

Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
This commit is contained in:
Viorel Munteanu 2025-11-09 18:23:14 +02:00
parent 016d2e0504
commit cb07875e43
No known key found for this signature in database
GPG Key ID: 0CE5A97D9310DAB0
2 changed files with 81 additions and 0 deletions

View File

@ -4,3 +4,5 @@ DIST lego-4.25.1.tar.gz 856233 BLAKE2B f1e1967aaa99d50e8b2ea399ec6c60828bc011fa5
DIST lego-4.28.0-deps.tar.xz 7245248 BLAKE2B deb55c9827bc9d19ae776fd299779305885d6d98bcaa9ed8247770800c5e45d390ecb60debdcb2c4d377ea41f85105df8bcd9a21d002e16f7183d7b63955fdfc SHA512 734d379ab6767b1c0e80d907b555acbc05add2c0b4bc6eb15574536219c60b2bf55d548687b911c73dd9b35718ab6dacc816776ffd76fbff116f6e3e5576c7d4
DIST lego-4.28.0-docs.tar.gz 3646947 BLAKE2B 088588b5e996b2a772d1f8d4155e29c5c99a0f66dac882a4f756d3d5d20df9b22dc225e750f5fe414cd092a0a07ce923c09c38a0469a70a06b09de1204507c80 SHA512 1bee644bab82a956b58729936a97eb91792505e09136fd099192daaf6acdff71961aebd389f3a81f6ee65c8b07fca748399d50f2e0692fe30e569d47d32061ad
DIST lego-4.28.0.tar.gz 915141 BLAKE2B 9b7f43d2cc9e0f956d14615b550d6b41bf3d22cfd02874696f91bad3ba46b5089b3924b5034183dd3b5b9e6def4bd5f7d704df1dde59eca482b1d2291e5d66cd SHA512 60fa5975bb65212e6618cec100fb6ae64afd65be413ba729b5bda1b99036fa24993ea46ae59eb7cb16cf26183eb3bf962aaf7836466c737fe326ef751b4721e1
DIST lego-4.28.1-docs.tar.gz 3647370 BLAKE2B 890240449e4d96513d8d0344d66f0872070c513a92e03c9b07728b8204ab38afc56f1df55e3024f6d68900b2a16e20aaf4adcf5c4745124437bf216167cef1f9 SHA512 4bf99279fcbb6e724a212e47549f2688169052c52e93b8a4e385a54cecc5cf3b18a085b910c593cf4a878afa4730fd6f271b440c9a624c682390368efdda1c13
DIST lego-4.28.1.tar.gz 915199 BLAKE2B 286c9a723fca6159aba191253f8c1288fa934a753e61b01ac505cb9666a635e70565bc3cfbffc5c6c6e8e74eb0d59244a95101ac0361d85f721fc429c030444a SHA512 1a959a2bf9e0eef24d81a46b78bb6f5a63da246c1a1b2d4280f4c7b805dc1d170676907af4297beb069da74d1d63624aeba3a3d8757193e864c908059e1a44f7

View File

@ -0,0 +1,79 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
DESCRIPTION="Let's Encrypt/ACME client (like certbot or acme.sh) and library written in Go"
HOMEPAGE="https://github.com/go-acme/lego/"
DOCUMENTATION_COMMIT=79065e2859fcd73d4086d37dee54856a3aba0191
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/go-acme/lego.git"
else
SRC_URI="
https://github.com/go-acme/lego/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/go-acme/lego/archive/${DOCUMENTATION_COMMIT}.tar.gz -> ${P}-docs.tar.gz
https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${PN}-$(ver_cut 1-2).0-deps.tar.xz
"
KEYWORDS="~amd64 ~arm64"
fi
# main
LICENSE="MIT"
# deps
LICENSE+=" Apache-2.0 BSD-2 BSD ISC MPL-2.0"
SLOT="0"
# some tests require network access otherwise get following error
# expected: "zoneee: unexpected status code: [status code: 401] body: Unauthorized"
# actual : "zoneee: could not find zone for domain \"prefix.example.com\" (_acme-challenge.prefix.example.com.): could not find the start of authority for _acme-challenge.prefix.example.com.: read udp 10.0.0.1:54729->10.0.0.1:53: read: connection refused"
PROPERTIES="test_network"
RESTRICT="test"
src_unpack() {
if [[ ${PV} == 9999* ]]; then
git-r3_src_unpack
go-module_live_vendor
EGIT_BRANCH="gh-pages"
EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}-${DOCUMENTATION_COMMIT}"
git-r3_src_unpack
else
default
fi
}
src_prepare() {
default
find ../"${PN}"-"${DOCUMENTATION_COMMIT}"/ -type f -not -name '*.html' -delete || die
}
src_compile() {
export CGO_ENABLED=0
local VERSION
if [[ ${PV} == 9999* ]]; then
VERSION="$(git rev-parse HEAD)" || die
else
VERSION="${PV}"
ln -sv ../vendor ./ || die
fi
ego build -trimpath -ldflags "-X main.version=${VERSION}" -o dist/"${PN}" ./cmd/lego/
}
src_test() {
ego test -v -cover ./...
}
src_install() {
# primary program
dobin dist/"${PN}"
# docs
einstalldocs
dodoc -r ../"${PN}"-"${DOCUMENTATION_COMMIT}"/*
}