feat: add dev-util/glab

This commit is contained in:
Jared Allard 2024-06-06 16:25:26 -07:00
parent 2acd2c3477
commit a1b7954d10
Signed by: jaredallard
SSH key fingerprint: SHA256:wyRyyv28jBYw8Yp/oABNPUYvbGd6hyZj23XVXEm5G/U
3 changed files with 61 additions and 0 deletions

2
dev-util/glab/Manifest Normal file
View file

@ -0,0 +1,2 @@
DIST deps.tar.xz 153044756 BLAKE2B c2f1df18913184a0163460f0ec5eeef5675c050efbfa0e429eb13a2c0a0c80c806a504eadf65a8c5cb4d7d06cbd8c6b3a872f3b0712a9134c7ddceb9725cae68 SHA512 1a8479ff560f8542921f62e8234d597b79b9f0517b373b29b2fae1a8593c141e0eaccb974ea50fdea09944cd66f1451a5e6c7e4bbf59c00a9eed407051340f6a
DIST glab-1.41.0.tar.gz 16729508 BLAKE2B 82e8d286dcac395425d34b5191d543b7266220643823ee903ba00200b5b36d6359384ef8d3c8b9dec5220cd5332d3d4510ff19fdebbe14c204419a602dfb7069 SHA512 66d996768b592aab6a43260812ccee6da84a314262adac1fa714cde539008182cd0fd54ac825d69729bef05ddd41249e25f40f7fc8376c23f4fc6abbc4f3b1a3

View file

@ -0,0 +1,34 @@
# Copyright 2020-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module tmpfiles
DESCRIPTION="Tailscale vpn client"
HOMEPAGE="https://gitlab.com/gitlab-org/cli"
SRC_URI="https://gitlab.com/gitlab-org/cli/-/archive/v${PV}/cli-v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://gentoo.rgst.io/updater_artifacts/${CATEGORY}/${PN}/${PV}/deps.tar.xz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm arm64 ~riscv ~x86"
BDEPEND=">=dev-lang/go-1.22"
RESTRICT="test"
src_compile() {
emake GLAB_VERSION=${PV} build
mkdir -p ${S}/man
go run ./cmd/gen-docs/docs.go --manpage --path ${S}/man
}
src_install() {
dobin ${S}/bin/${PN}
einstalldocs
for page in "${S}/man/"*; do
doman "${S}/man/$page"
done
}

View file

@ -95,3 +95,28 @@ app-admin/chezmoi:
sed -i 's|dev-lang\/go-.*|dev-lang\/go-'"${GO_VERSION}"'"|' new.ebuild
- upload_artifact: deps.tar.xz
- ebuild: new.ebuild
dev-util/glab:
resolver: git
options:
url: https://gitlab.com/gitlab-org/cli.git
# We have to generate a Go dependency archive and upload it to a
# stable location, so we do that during this process.
steps:
- checkout: https://gitlab.com/gitlab-org/cli
- original_ebuild: new.ebuild
- command: |-
set -euxo pipefail
GO_VERSION=$(grep "^go" go.mod | awk '{ print $2 }' | awk -F '.' '{ print $1"."$2}')
mise use -g golang@"${GO_VERSION}"
# Create the dependency tar.
GOMODCACHE="${PWD}"/go-mod go mod download -modcacherw
tar --create --file deps.tar go-mod
xz --threads 0 deps.tar
sed -i 's|dev-lang\/go-.*|dev-lang\/go-'"${GO_VERSION}"'"|' new.ebuild
- upload_artifact: deps.tar.xz
- ebuild: new.ebuild