dev-util/forgejo-runner: add 12.12.0

Signed-off-by: Ceres <ceres@ceressees.dev>
This commit is contained in:
Ceres
2026-06-27 15:47:27 +01:00
parent d8b9464049
commit 577b10183c
2 changed files with 97 additions and 0 deletions

View File

@@ -2,3 +2,5 @@ DIST forgejo-runner-12.10.2-deps.tar.xz 41852292 BLAKE2B bac2447f40db70fba40c464
DIST forgejo-runner-12.10.2.tar.gz 3529492 BLAKE2B b405b21ba1f36d68a2a28d76294084543a10e2be658ce011e34f0a465d2a55e0704705951de090cec2446dd25cc3d11377adcbfbd2518b919d9cb958d4263008 SHA512 b121611069f5bfdb709f5b61e739c9c94ed3950c96cf8fee29ebe735a302cbac152c39062ec37739db68efa4421da51909f0a7aa64b2032f4c559a300935e6ec
DIST forgejo-runner-12.11.1-deps.tar.xz 41852968 BLAKE2B cc96d61ae38866b06ef0928cb533b03b283462deb2468e13a672df84d3bb2680e73b8a0817411af20a37678eba2b8cbf7112109a2c8c7bff35912cac06c40f93 SHA512 77e52efb6460dba07cd8381c3b39e73c54f5f3e008aa09b8b25db743b5e938c607649da631e03e063c870fa9047a0316f56462b02f8f526e13328c00ad551fed
DIST forgejo-runner-12.11.1.tar.gz 3535351 BLAKE2B 887c9eb5dd85b30287f7211e175cda99ab01a9678632c2394498cf5ca2e55a5ab8e5b4b391299ef5a90c31fed625275e9ce310acf9349efada25fbd01b670e99 SHA512 dd70fc0509ca819b9027155788e35b80a810d54d78831e1d6ebfaa6bde6e1d171290e184ec53ca0e260df4f9f39447b02ee4e8391900f88c248866c6cee7343a
DIST forgejo-runner-12.12.0-deps.tar.xz 41852968 BLAKE2B cc96d61ae38866b06ef0928cb533b03b283462deb2468e13a672df84d3bb2680e73b8a0817411af20a37678eba2b8cbf7112109a2c8c7bff35912cac06c40f93 SHA512 77e52efb6460dba07cd8381c3b39e73c54f5f3e008aa09b8b25db743b5e938c607649da631e03e063c870fa9047a0316f56462b02f8f526e13328c00ad551fed
DIST forgejo-runner-12.12.0.tar.gz 3539356 BLAKE2B 794b509f58ae3da3f92d345cfacccf5ba80b9f0e205ba34f7c5cf79688ee4483f1f8d9d649ee9ce799127a3a96262d134bd194df43f37967acece73fa082e7b0 SHA512 ea341e2780d417bc85e6d061deee5281d5d26deb57e13d45976542c9ed411eba8bfc8ba3810b832e518094b822c8b6a753510dabf625b873dc162b470b05deb0

View File

@@ -0,0 +1,95 @@
# Copyright 2024-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module systemd
DESCRIPTION="A daemon that connects to a Forgejo instance and runs jobs for CI"
HOMEPAGE="https://code.forgejo.org/forgejo/runner https://forgejo.org/docs/next/admin/actions/"
if [[ "${PV}" == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://code.forgejo.org/forgejo/runner.git"
else
SRC_URI="
https://code.forgejo.org/forgejo/runner/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/gentoo-golang-dist/${PN}/releases/download/v${PV}/${P}-deps.tar.xz
"
S="${WORKDIR}/runner"
KEYWORDS="~amd64 ~arm64"
fi
LICENSE="MIT"
SLOT="0"
IUSE="examples +docker podman lxc"
RESTRICT="mirror test"
REQUIRED_USE="|| ( docker podman lxc )"
DEPEND="
>=dev-lang/go-1.25.11
"
RDEPEND="
acct-user/${PN}[docker=,podman=,lxc=]
"
src_unpack() {
if [[ "${PV}" == *9999* ]]; then
git-r3_src_unpack
go-module_live_vendor
else
go-module_src_unpack
fi
}
src_prepare() {
default
sed \
-e "/ExecStart=/s#=.*#=${EPREFIX}/usr/bin/forgejo-runner daemon -c %h/runner-config.yml#g" \
-e "/ExecReload=/s#=#=${EPREFIX}#g" \
-e "/User=/s#=.*#=${PN}#g" \
-e '/WorkingDirectory=/s#=.*#=~#g' \
-i contrib/forgejo-runner.service || die
}
src_compile() {
# export version information
# https://github.com/gentoo/guru/pull/205
# https://forums.gentoo.org/viewtopic-p-8831646.html
local VERSION
if [[ "${PV}" == *9999* ]]; then
VERSION="$(
git describe --tags --first-parent --abbrev=7 --long --dirty --always \
| sed -e "s/^v//g"
)"
else
VERSION="${PVR}"
fi
local EXTRA_GOFLAGS_LD=(
# "-w" # disable DWARF generation
# "-s" # disable symbol table
"-X=code.forgejo.org/forgejo/runner/v11/internal/pkg/ver.version=v${VERSION}"
)
GOFLAGS+=" '-ldflags=${EXTRA_GOFLAGS_LD[*]}'"
ego build -tags 'netgo osusergo' -o forgejo-runner
# Makefile does this
# emake forgejo-runner
}
src_install() {
dobin forgejo-runner
systemd_dounit "contrib/forgejo-runner.service"
dodoc "README.md"
if use examples; then
dodoc -r "examples"
docompress -x "/usr/share/doc/${PF}/examples"
fi
}