commit: 0ef80d416e79e8f689da96ef56532be866fcb4a5 Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com> AuthorDate: Tue Nov 18 15:58:46 2025 +0000 Commit: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com> CommitDate: Mon Jan 19 15:37:12 2026 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0ef80d41
dev-util/forgejo-runner: add 12.5.3 9999, new package Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com> dev-util/forgejo-runner/Manifest | 2 + .../forgejo-runner/forgejo-runner-12.5.3.ebuild | 79 ++++++++++++++++++++++ dev-util/forgejo-runner/forgejo-runner-9999.ebuild | 79 ++++++++++++++++++++++ dev-util/forgejo-runner/metadata.xml | 11 +++ 4 files changed, 171 insertions(+) diff --git a/dev-util/forgejo-runner/Manifest b/dev-util/forgejo-runner/Manifest new file mode 100644 index 0000000000..f4756b138b --- /dev/null +++ b/dev-util/forgejo-runner/Manifest @@ -0,0 +1,2 @@ +DIST forgejo-runner-12.5.3-deps.tar.xz 54999260 BLAKE2B 59d88a51db7812c8b5083627bef25500b4924fbaf0d043118f75592db2d19c3514a7ff27f26cfdae8f20bdff1c7aff2a34b1d4bdec9dcd7e03ee1382e121b9f7 SHA512 48f4579a32393c235c5fd45e605bddf574a45260acd14326e609120ae3cdb4e2acf13be0ece01e390a6db7f797e633cc81e0d36c3cd96dabbcc5a624a8d9227a +DIST forgejo-runner-12.5.3.tar.gz 3476349 BLAKE2B 343acfc40cb137fc9111b38e4a07776cab6a8f125425b5d1125065c743336f23268d0dd608b8cc2e3a51055a7d954f9c428c050efa8c3e50baa1ec7369f7f5fd SHA512 e55a5042cdb9c1e8325d0f111f8d9bdc5640c7ed1ed0cfd6e7b6bd383fbf08677d877212733eab2d2736c58c9b051074d0921a2022deeb110e77347b70a88832 diff --git a/dev-util/forgejo-runner/forgejo-runner-12.5.3.ebuild b/dev-util/forgejo-runner/forgejo-runner-12.5.3.ebuild new file mode 100644 index 0000000000..470d72feb4 --- /dev/null +++ b/dev-util/forgejo-runner/forgejo-runner-12.5.3.ebuild @@ -0,0 +1,79 @@ +# 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" +RESTRICT="test" + +DEPEND=" + >=dev-lang/go-1.24.0 +" + +src_unpack() { + if [[ "${PV}" == *9999* ]]; then + git-r3_src_unpack + go-module_live_vendor + else + go-module_src_unpack + fi +} + +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 +} diff --git a/dev-util/forgejo-runner/forgejo-runner-9999.ebuild b/dev-util/forgejo-runner/forgejo-runner-9999.ebuild new file mode 100644 index 0000000000..470d72feb4 --- /dev/null +++ b/dev-util/forgejo-runner/forgejo-runner-9999.ebuild @@ -0,0 +1,79 @@ +# 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" +RESTRICT="test" + +DEPEND=" + >=dev-lang/go-1.24.0 +" + +src_unpack() { + if [[ "${PV}" == *9999* ]]; then + git-r3_src_unpack + go-module_live_vendor + else + go-module_src_unpack + fi +} + +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 +} diff --git a/dev-util/forgejo-runner/metadata.xml b/dev-util/forgejo-runner/metadata.xml new file mode 100644 index 0000000000..c3a3e82bdb --- /dev/null +++ b/dev-util/forgejo-runner/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>[email protected]</email> + <name>Paul Zander</name> + </maintainer> + <upstream> + <remote-id type="github">gentoo-golang-dist/forgejo-runner</remote-id> + </upstream> +</pkgmetadata>
