mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
dev-util/forgejo-runner: add 13.2.0
Signed-off-by: Ceres <ceres@ceressees.dev>
This commit is contained in:
2 files changed
+97
No files matched your search
@@ -2,3 +2,5 @@ DIST forgejo-runner-12.13.0-deps.tar.xz 41852968 BLAKE2B cc96d61ae38866b06ef0928
|
||||
DIST forgejo-runner-12.13.0.tar.gz 3543052 BLAKE2B e406c95b14f3ae49a7d07958153499548d47600db6e16b3529c2d973001d95bd564dbd3fac9881615bf54f3b7b696844efc00a3836b48cedb3862e3d7c39ac9b SHA512 9cad33277021cb200c2cc644a1999748bfa2c90e75438125edb899ed749d80e71dae561ddb62f074e63ca4a1a4eef78bf0730cc01485a2f9f49392962db1f5c6
|
||||
DIST forgejo-runner-12.13.2-deps.tar.xz 41852968 BLAKE2B cc96d61ae38866b06ef0928cb533b03b283462deb2468e13a672df84d3bb2680e73b8a0817411af20a37678eba2b8cbf7112109a2c8c7bff35912cac06c40f93 SHA512 77e52efb6460dba07cd8381c3b39e73c54f5f3e008aa09b8b25db743b5e938c607649da631e03e063c870fa9047a0316f56462b02f8f526e13328c00ad551fed
|
||||
DIST forgejo-runner-12.13.2.tar.gz 3543772 BLAKE2B ec7fd267c14c91937abf7735e158a4d9cf47ff1ca8be56bdc8961e02192fbc38576058094d38055beef7b0cede904a28e868ae51928e7a9209ad1611c66cf149 SHA512 0fce51d7ceb06b201c007760c16465fec2d46c03cc343b3c717fe75aa6ca517da967368ded405aef6d2ed70e89bd6ab2426c0e59f982ee345438097eaa28e3cc
|
||||
DIST forgejo-runner-13.2.0-deps.tar.xz 45119324 BLAKE2B 2f09b9b109221bf47369d081f05cbf768f3cf4d8876114b28815c30e6f34eaa2de5e1851286606bd5cc6e154230055fef32c6b1767754e1d7dd7a59fe8988651 SHA512 a21099db7efa479dc969e0544085202735bd3246042d9d2111f3e3565a4ecb110b996794dd6688d8400b5cc5722878f2876f53cd13bd1b0f1d01e83a7687e052
|
||||
DIST forgejo-runner-13.2.0.tar.gz 3595299 BLAKE2B 3eabb5369cc624d8916d5b73fe05a04286870f548d2089d4b47e2bfe0a425dd7049453e33740dd9c00e1b5ba5bfea43fc37b3759438dad9a00290b2bc8b86c85 SHA512 847db860452cf858fadd14eff1854aa1dbdf1ea151f34de1aea66b827c54fdebbd6db5137d36e9a901448565034eae1e840f2084e41a799c735f0601c735e721
|
||||
@@ -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.26.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
|
||||
}
|
||||
Reference in new issue
Block a user