Simplify some Go ebuilds

This commit is contained in:
Sam Therapy 2023-11-08 23:33:38 +01:00
parent c37b2eaeed
commit c6b831928c
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
7 changed files with 54 additions and 136 deletions

View file

@ -1,4 +1,4 @@
DIST swag-1.16.2-vendor.tar.xz 531512 BLAKE2B 6631be1256f19f46c5e724375c2985210539b15f3c80d06012a7e357886822754f9c6bb7cfbffa2221123f7a99f6785bce2eba869178b018c6d01a2dc6f59438 SHA512 b0dfac2746e04dda8665b93a733bcb1f0d58eaabc950d61d153ebde468b6f58e81e7c358ac5f6a037c3c1a32ebecd29b7db02d43fe6f88ddd418c544998f481a
DIST swag-1.16.2-vendor.tar.xz 489536 BLAKE2B 23c9baf576af9f3651c0d4f042aed3fa3d09f91fb63ba61b0de71ae0a1bcc2a0269ff162d14f48ceec6ad398eed1d49104c48c0d5468a71680c9527beebc0337 SHA512 dcdc8f5e1e644203ecf9823f9e9a0a42edc2ebc770420afd719bf242f596a76ca1ed7cbddf9ec24234d571da85aa882e06d6d6e5a5f2b1b834cdd1c7f3509dc0
DIST swag-1.16.2.tar.gz 283489 BLAKE2B bedc61a4929c5846092976d9de05bd47ad25506c1fa4710cdcabcc2c43472c6bb2fbea9b2664c39ae47ae419645102832fc1c082dc66e8264ffdab09f62b8459 SHA512 fcf1f695435c401ab4963e3abbf9747965d02485d2818c38a14912562744d7814b0d79e4237ffb6ee70ab0a04d5dbc192510436f7c3b06186add8533d25c5c01
EBUILD swag-1.16.2.ebuild 581 BLAKE2B 7979fb20c5a681f8bc04dcac9784282716bc8e555e3853c158672d81dc1be12065e18aa6811c38990ce2e1028abaec9a5df089bc01a96204d9180bed69a4ac6d SHA512 5c2131f27ec6ecaa085526fa47a42c15fc0ba9e5243c60a6693d8112a71e3e084029e5a161d4d99abe5a947938f7c0ad47229fda253a2475ee426a09825eedf9
EBUILD swag-9999.ebuild 496 BLAKE2B d2c57cd96b0a0a5c79ed6897a0545daef598b84660cb0681f84667bbacffad2f1a14bf01347d623409dba857cdc07f043536be9a0f929a76214c50739759ca64 SHA512 0bc56dd20f224e47bb1a0bb1a1f1b0c14412fbde99c1e10722dfe229d5117eba72b490815fd1215ec2d3d312866e3d2edf2bc6c7f1a0c301833ab916524adffa
EBUILD swag-1.16.2.ebuild 768 BLAKE2B ef9252133f896ec25c0c69ebb881a43f0f2293138406d7130d5b009adaed6e15bf666c85b367efc1faff6f8b38a0a6cf4b48e6ad97ea6b357e0d14ca7fdf2b46 SHA512 82f79e3e46edcded751e95f34f87600de4fb95bbb2a3bad50c79d9cfe66ce9b5d6c1ccb9fee3f5ca104afa5682b93605aadd30aa0bbb97ddf64d91ae90d88afa
EBUILD swag-9999.ebuild 768 BLAKE2B ef9252133f896ec25c0c69ebb881a43f0f2293138406d7130d5b009adaed6e15bf666c85b367efc1faff6f8b38a0a6cf4b48e6ad97ea6b357e0d14ca7fdf2b46 SHA512 82f79e3e46edcded751e95f34f87600de4fb95bbb2a3bad50c79d9cfe66ce9b5d6c1ccb9fee3f5ca104afa5682b93605aadd30aa0bbb97ddf64d91ae90d88afa

View file

@ -1,26 +0,0 @@
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
DESCRIPTION="command-line DNS query client"
HOMEPAGE="https://github.com/swaggo/swag"
SRC_URI="https://github.com/swaggo/swag/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://git.froth.zone/api/packages/packaging/generic/portage/deps/${P}-vendor.tar.xz"
LICENSE="MIT Apache-2.0 BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
GOFLAGS+=" -mod=vendor"
src_compile() {
ego build ./cmd/swag
}
src_install() {
dobin ./${PN}
einstalldocs
}

View file

@ -0,0 +1 @@
swag-9999.ebuild

View file

@ -1,29 +1,34 @@
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
inherit git-r3 go-module
inherit go-module
DESCRIPTION="Swagger 2.0 documentation generator"
DESCRIPTION="Swagger 2.0 documentation generator for Go"
HOMEPAGE="https://github.com/swaggo/swag"
EGIT_REPO_URI="https://github.com/swaggo/swag.git"
RESTRICT="network-sandbox strip"
LICENSE="MIT Apache-2.0 BSD"
SLOT="0"
IUSE=""
src_unpack() {
git-r3_src_unpack
go-module_live_vendor
}
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/swaggo/swag.git"
src_unpack() {
git-r3_src_unpack
go-module_live_vendor
}
else
SRC_URI="https://github.com/swaggo/swag/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://git.froth.zone/api/packages/packaging/generic/portage/deps/${P}-vendor.tar.xz"
KEYWORDS="~amd64 ~arm64 ~x86"
fi
src_compile() {
ego build ./cmd/swag
}
src_install() {
dobin ./${PN}
dobin ./${PN}
einstalldocs
}

View file

@ -4,7 +4,7 @@ DIST awl-0.6.6-deps.tar.xz 2171684 BLAKE2B 99448b44ddfee6ce03289995dacad33272cfd
DIST awl-0.6.6.tar.gz 48820 BLAKE2B 22737628b268868842f8de991c137cea59eec10be6b206035f13a68d615eb37e7ff527bc77631a236f9f807ca85ac8a608064fe035d74180d94dceede9c6c619 SHA512 0d65ccc1eb520fb9806464f3af9d6d331012e1a334c6c2328d1bc2d242cf46e9db01dc77a52c51991167e50a6711e52d0002367e01f6f7bde743b12cc1799c35
DIST awl-0.6.9-deps.tar.xz 6408852 BLAKE2B 31a805dd72d7f018687c1702d45376f211be0b8e6bc1aa25bf4e65e58758d7f37bef0cf3429f236180cb12e5b5855b1419c502450712eb10e98ed5c7ab822b4e SHA512 25264af75b84d926fbcfcb14aaed1c72989f28c8984018132da336f557372fd6a72f53c9b109b214c5bb3432237ded378d2ee873b0e9b3e13fb65d8a9a8fab24
DIST awl-0.6.9.tar.gz 48050 BLAKE2B 0d100417486fddd8de6d68ba098e0b42fecc72ddbbdb9615e827d2ba2cb658de80b09a54cfd09ce915666fe2b4441f2d5d60204badb5679bc578931b661a9edb SHA512 a7be7d99ad92eabc7ad35fc39e8d21bf913ed6a558a41962f0a7cd1744d37517fef11b0cc0c51bedb3ac559562e51e8406e95001bda4218fb9d58bf0b6459596
EBUILD awl-0.6.10.ebuild 1017 BLAKE2B 92c2742b9df10e4f2b68dfa75e36bdcf3ab603439c6cd331f21a8f022372bb94b19bdc19482b7b25268821ee32f5c8215651c07dfd438e350a5a4277ef4ab0d0 SHA512 1820a02f5de70d797d5b2880c3f029fd00de28c8a061b7c1c95f5a5f0daf4e37c1de960f2e4ead1ab9caeb5f53af1f9dacdca1adb165c2e634595252a8940aba
EBUILD awl-0.6.10.ebuild 1364 BLAKE2B 3701ce60dc5cbd3bed8d509717128441bfebcd1334aa076c0a35c170097a590eaca8d386cdedc7faabf2d23d350cc4f4dd9abe3ed62187efeb8a0789d408e320 SHA512 2d9e02c5aaafc445056a9e318fc148c1a765561df7c14bf88102681a18cbb98a3192e0ef06bb7721b9e6230eff2d092bd6fb14264e837fc4b51212cef4cdf813
EBUILD awl-0.6.6.ebuild 1235 BLAKE2B a364904b77f43d0cf6d37667bf42d05a3c9294f4d61afda8200324cce728cbd671c0177a4d7db984111074d975da41ea2203391fa263ab84ca835fe52a18e78e SHA512 a7c06f0a0b09cb46b8065d60691e2a59b5613316af9dd98f31b2d69e6db3ff73856ac34eb4fe278560b0c485fe3fcae1f9a4e2d0bbce77957c78e1f5c4235c32
EBUILD awl-0.6.9.ebuild 1017 BLAKE2B 92c2742b9df10e4f2b68dfa75e36bdcf3ab603439c6cd331f21a8f022372bb94b19bdc19482b7b25268821ee32f5c8215651c07dfd438e350a5a4277ef4ab0d0 SHA512 1820a02f5de70d797d5b2880c3f029fd00de28c8a061b7c1c95f5a5f0daf4e37c1de960f2e4ead1ab9caeb5f53af1f9dacdca1adb165c2e634595252a8940aba
EBUILD awl-9999.ebuild 820 BLAKE2B 3f715d67b83984cdca048952f07dc85443c4ba2077d1fdd965ab19c456ce9ee5166d41cd25e68afa52d4cafe1c284a1978d181a969e49d3bfb9c5c75aea0fe27 SHA512 fd60b671ed299f541dcd255e2db0d53d697538e0309b9de62995085c547191cc10d6e0c84104133e1c3373738289132ac66b9ba377aa8f3cec0729572f0d13b6
EBUILD awl-0.6.9.ebuild 1364 BLAKE2B 3701ce60dc5cbd3bed8d509717128441bfebcd1334aa076c0a35c170097a590eaca8d386cdedc7faabf2d23d350cc4f4dd9abe3ed62187efeb8a0789d408e320 SHA512 2d9e02c5aaafc445056a9e318fc148c1a765561df7c14bf88102681a18cbb98a3192e0ef06bb7721b9e6230eff2d092bd6fb14264e837fc4b51212cef4cdf813
EBUILD awl-9999.ebuild 1364 BLAKE2B 3701ce60dc5cbd3bed8d509717128441bfebcd1334aa076c0a35c170097a590eaca8d386cdedc7faabf2d23d350cc4f4dd9abe3ed62187efeb8a0789d408e320 SHA512 2d9e02c5aaafc445056a9e318fc148c1a765561df7c14bf88102681a18cbb98a3192e0ef06bb7721b9e6230eff2d092bd6fb14264e837fc4b51212cef4cdf813

View file

@ -1,40 +0,0 @@
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
DESCRIPTION="command-line DNS query client"
HOMEPAGE="https://git.froth.zone/sam/awl"
SRC_URI="https://git.froth.zone/sam/awl/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://git.froth.zone/sam/awl/releases/download/v${PV}/${P}-deps.tar.xz"
# test requires network for making DNS queries
RESTRICT="strip test"
LICENSE="BSD MIT Unlicense CC0-1.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86"
BDEPEND="app-text/scdoc"
# Gitea and only Gitea puts their tarballs in weird places
S="${WORKDIR}/awl"
src_configure() {
GOFLAGS+=" -ldflags=-s -ldflags=-w -ldflags=-X=main.version=${PV}"
}
src_compile() {
emake PREFIX="${EPREFIX}/usr"
}
src_test() {
#-buildmode=pie clashes with -race
emake test GOFLAGS="-buildvcs=false -modcacherw -v -x"
}
src_install() {
emake PREFIX="${EPREFIX}/usr" DESTDIR="${ED}" install
einstalldocs
}

View file

@ -0,0 +1 @@
awl-9999.ebuild

View file

@ -1,40 +0,0 @@
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
DESCRIPTION="command-line DNS query client"
HOMEPAGE="https://git.froth.zone/sam/awl"
SRC_URI="https://git.froth.zone/sam/awl/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://git.froth.zone/sam/awl/releases/download/v${PV}/${P}-deps.tar.xz"
# test requires network for making DNS queries
RESTRICT="strip test"
LICENSE="BSD MIT Unlicense CC0-1.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86"
BDEPEND="app-text/scdoc"
# Gitea and only Gitea puts their tarballs in weird places
S="${WORKDIR}/awl"
src_configure() {
GOFLAGS+=" -ldflags=-s -ldflags=-w -ldflags=-X=main.version=${PV}"
}
src_compile() {
emake PREFIX="${EPREFIX}/usr"
}
src_test() {
#-buildmode=pie clashes with -race
emake test GOFLAGS="-buildvcs=false -modcacherw -v -x"
}
src_install() {
emake PREFIX="${EPREFIX}/usr" DESTDIR="${ED}" install
einstalldocs
}

View file

@ -0,0 +1 @@
awl-9999.ebuild

View file

@ -3,26 +3,42 @@
EAPI=8
inherit git-r3 go-module
inherit go-module
DESCRIPTION="command-line DNS query client"
HOMEPAGE="https://git.froth.zone/sam/awl"
HOMEPAGE="https://dns.froth.zone/awl"
EGIT_REPO_URI="https://git.froth.zone/sam/awl.git"
RESTRICT="network-sandbox strip"
# test requires network for making DNS queries
RESTRICT="test"
LICENSE="BSD MIT Unlicense CC0-1.0"
SLOT="0"
BDEPEND="app-text/scdoc"
src_unpack() {
git-r3_src_unpack
go-module_live_vendor
}
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.froth.zone/sam/awl.git"
src_configure() {
src_unpack() {
git-r3_src_unpack
go-module_live_vendor
}
src_configure() {
GOFLAGS+=" -ldflags=-s -ldflags=-w -ldflags=-X=main.version=$(git-r3_peek_remote_ref)-gentoo"
}
}
else
SRC_URI="https://git.froth.zone/sam/awl/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://git.froth.zone/sam/awl/releases/download/v${PV}/${P}-deps.tar.xz"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86"
# Gitea and only Gitea puts their tarballs in weird places
S="${WORKDIR}/awl"
src_configure() {
GOFLAGS+=" -ldflags=-s -ldflags=-w -ldflags=-X=main.version=${PV}"
}
fi
src_compile() {
emake PREFIX="${EPREFIX}/usr"