dev-util/forgejo-runner: add 12.8.0

Signed-off-by: Ceres <ceres@ceressees.dev>
This commit is contained in:
Ceres
2026-04-04 17:29:38 +01:00
parent 5dfb320a98
commit 83ffc49822
2 changed files with 97 additions and 0 deletions

View File

@@ -1,2 +1,4 @@
DIST forgejo-runner-12.7.3-deps.tar.xz 96877712 BLAKE2B e2d1558baa423e1815ee3fc68c22cce6168a7c09df930c0d26a5b39f56e34b8ab16d8a8dd55bdc9db44f68a808803830be128831955c7d3da72d8e69cc72cd84 SHA512 abda81b16f2cb72c962b69d0fc49b511e92403d7b27bec9c34ad8c8ecdef8d4e4b2db52e851def249b6c41ca4f299b256a9a52d3246075bdb29a7655c23af235
DIST forgejo-runner-12.7.3.tar.gz 3501042 BLAKE2B 6f544ee6e2e3c13427500c2699d3e4fa91331628aa0c524952720d41ce251542080c4d4f99e288161372fb5f614e5236089d76557f9b7ff89d5823f0339730d2 SHA512 34e4e38669e20058c5a6d5743986b8ce5a5cf829ba93c34cecc70f1cd42dc334c1f1cbce56e7cdf295d9d966c8ff0a9dab803e19a36c04883891adf34304af0b
DIST forgejo-runner-12.8.0-deps.tar.xz 96869372 BLAKE2B f1d88d469cfa46c0f955e70d0dd2391f18c66fd9a58bb6d5b72379fb32cf565711baa6d5b08fec16064792d41d93dd993c9a7926e843d30d01fdd87babe49319 SHA512 480f4ae04cbe3b96f479225fd24ad44f33b82298ba907df067cdd8c13fae1361a0e729c989875c086821298c066898e5b96c3589004db972eca69068ea56fe8a
DIST forgejo-runner-12.8.0.tar.gz 3507963 BLAKE2B 49e22e42763ef0dc04f6c710848e14fe5b91ee353880d6dec66b7d14092a9adc6c5aa59d3780258f996d9c0483a6b4b233028f69030051495e8f224553cf006a SHA512 0ba0f3d5dd4598169a3358d574af8a07c19f284b231372a8a9aa7e99c6f6b24d5e48ebdc0914788a1b4a213e02878e6ce0d8b16495b6d0ee1a3b443f8d6770e8

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.8
"
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
}