diff options
Diffstat (limited to 'app-crypt/lego')
-rw-r--r-- | app-crypt/lego/Manifest | 6 | ||||
-rw-r--r-- | app-crypt/lego/lego-4.22.2.ebuild | 79 | ||||
-rw-r--r-- | app-crypt/lego/lego-9999.ebuild | 79 | ||||
-rw-r--r-- | app-crypt/lego/metadata.xml | 17 |
4 files changed, 181 insertions, 0 deletions
diff --git a/app-crypt/lego/Manifest b/app-crypt/lego/Manifest new file mode 100644 index 000000000000..8cd3ebde4ab2 --- /dev/null +++ b/app-crypt/lego/Manifest @@ -0,0 +1,6 @@ +DIST lego-4.22.2-deps.tar.xz 7963988 BLAKE2B 279adf06311ee0769acb7e8681da09fef75456f8ade9d45f0daaa031920fcb2198fd0cab5a37e04332fccfb30e195fcfc1e66f80644861a6a3d502fa650264c5 SHA512 24e9cdf1afe65845a6c7846e71f92532b3e7dad304f9ea4b04afb0f65d8842c67036578fa453ce6a9cd6835be97e86412a52d31fa958bf8b3645e6d3297137b8 +DIST lego-4.22.2-docs.tar.gz 10722353 BLAKE2B 24dea7d335646d12c55e23e030a81767618da9c32a09e464d7fad0e91f914eaed4508c1d1a771725c9ea0e2eedb8cddc2e5cd6b0e2bb31c7d1ee89791d342ed9 SHA512 1b998ee4153e5621b7c53e9dc4941c6749c916c6c92d2dfe8e2373f6ee7ad86dd2d13c1ef1d227a464a182ec7c35484d524778e8e6dc4531941eccc2b6304c22 +DIST lego-4.22.2.tar.gz 804158 BLAKE2B a75a327988d46ed8715a3c28c34a5de1c9de607b396b3179645a7b4a0dd83aa408bad10df4e64cc5d402ddf8653d17c034019c4d4f162fb9a252d83013278314 SHA512 a69c15e65753ba428635804a0f47d708c13beab3cbd888cc6d9b80fc13ee0614c4a4e948b43972d201f95969171db4443b81672ad93b7a681b96af11f9250db1 +EBUILD lego-4.22.2.ebuild 2059 BLAKE2B f85a465e42894af4f0b68db3438d2fb9f6ae2bd6eb4d92a33bda91de4809086a8b6c5701455d87f04d39008006dd79065474007c7cf1c7e17af0c477e1344682 SHA512 1e958d23aae1a609b2c5eb5fc8bab4fe4651b7769f9921880a1357ce815d3308021a554be1cb7321200ef078591b2d0d85005aa6ebd9c4743c6933e120a980ab +EBUILD lego-9999.ebuild 2052 BLAKE2B 4909201a234a33b24f799b61b7b9260e768f90e4a4bbbe3b722fcd969cedf8b20f9c5d50a56de5fd6cfc48a80442cc8aa724a7199c2110d4e64e286f438c3b9c SHA512 4d203f4f26c76a0806d74ca7140a099ed111677556b63101242a3aa9f68b939e7b9a25a089751179ca853feddeea2f2a5e334e0ae26438c1d9d1567cd74de6a7 +MISC metadata.xml 561 BLAKE2B f4cfb6d9647b87b5b4ed5215acabae401439a372d759184d948b9570ba4e0dda039825cf8c3034654136b2719ada3d7d3e4ebaf5367dc4c818a93f3548e2b3e5 SHA512 340180b660545dbb9a583af86ec9b13eb7b2493bc56a86ff0d81b7ca7f1bf3152c86207bfa7b79d02448560eedd5da346d793b69e215c5b3fd5bb2b4925d317b diff --git a/app-crypt/lego/lego-4.22.2.ebuild b/app-crypt/lego/lego-4.22.2.ebuild new file mode 100644 index 000000000000..1d6164d31809 --- /dev/null +++ b/app-crypt/lego/lego-4.22.2.ebuild @@ -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=f1411f1b397b637903fd2e62769d50b3974b97ec + +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/rahilarious/gentoo-distfiles/releases/download/${P}/deps.tar.xz -> ${P}-deps.tar.xz + https://github.com/go-acme/lego/archive/${DOCUMENTATION_COMMIT}.tar.gz -> ${P}-docs.tar.gz +" + 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}"/* +} diff --git a/app-crypt/lego/lego-9999.ebuild b/app-crypt/lego/lego-9999.ebuild new file mode 100644 index 000000000000..e80722f65cd1 --- /dev/null +++ b/app-crypt/lego/lego-9999.ebuild @@ -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=f1411f1b397b637903fd2e62769d50b3974b97ec + +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/rahilarious/gentoo-distfiles/releases/download/${P}/deps.tar.xz -> ${P}-deps.tar.xz + https://github.com/go-acme/lego/archive/${DOCUMENTATION_COMMIT}.tar.gz -> ${P}-docs.tar.gz +" + KEYWORDS="~amd64" +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}"/* +} diff --git a/app-crypt/lego/metadata.xml b/app-crypt/lego/metadata.xml new file mode 100644 index 000000000000..a150df1868ae --- /dev/null +++ b/app-crypt/lego/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>me@rahil.rocks</email> + <name>Rahil Bhimjiani</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="github">go-acme/lego</remote-id> + <bugs-to>https://github.com/go-acme/lego/issues</bugs-to> + <doc>https://go-acme.github.io/lego/</doc> + </upstream> +</pkgmetadata> |