net-misc/q: Add new package version 0.8.2

Signed-off-by: Nils Freydank <nils.freydank@posteo.de>
This commit is contained in:
Nils Freydank 2022-09-01 22:54:15 +02:00
parent c6fc75eb18
commit 915834333b
Signed by: nfr
GPG Key ID: 0F1DEAB2D36AD112
3 changed files with 71 additions and 0 deletions

2
net-misc/q/Manifest Normal file
View File

@ -0,0 +1,2 @@
DIST q-0.8.2-deps.tar.xz 26449592 BLAKE2B 3a2a23ff11d494376ec3ae55b4ec2108fcf2cf25ac32f940a65fc7e34902583d63f86be3a0dcdc00ecbac5939d989e6d827dd4013d0f705a15e0b5a9611b87b5 SHA512 9a6012d14fe7533da796cf8e0328d9005bb2066784391651e612f3e6145d80babd81828a41610093fd671a5dfbd3289c95034cccdeaee755f86686a9620c1d6d
DIST q-0.8.2.tar.gz 387641 BLAKE2B 8d61f7a7f4740e40b19142d2481749605c85b4f14a864657dde50af36b42cec7ad42e50e8c28d774acc52d65afaaabc8c22e788319a39a886d0a76ee1c762c92 SHA512 14fe10c267b0897fa9884cb8b07f03f0457eb040547b444bade3b623938813722ba86da9b3d08d71bd4673ff186cd9a4930afb0b0c02debf5bed2a51d285256e

11
net-misc/q/metadata.xml Normal file
View File

@ -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>holgersson@posteo.de</email>
<name>Nils Freydank</name>
</maintainer>
<upstream>
<remote-id type="github">natesales/q</remote-id>
</upstream>
</pkgmetadata>

58
net-misc/q/q-0.8.2.ebuild Normal file
View File

@ -0,0 +1,58 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
EGO_PN="github.com/natesales/q"
COMMIT_ID="72fa909c3d5da33ba4ffc96920988a9b5873427f"
inherit go-module
HOMEPAGE="https://github.com/natesales/q"
DESCRIPTION="DNS client with support for UDP, TCP, DoT, DoH, DoQ and ODoH"
if [[ ${PV} == *_p* ]]; then
SRC_URI="
https://${EGO_PN}/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz
https://files.holgersson.xyz/gentoo/distfiles/${P}-deps.tar.xz
"
S="${WORKDIR}/${PN}-${COMMIT_ID}"
else
SRC_URI="
https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://files.holgersson.xyz/gentoo/distfiles/${P}-deps.tar.xz
"
fi
KEYWORDS="~amd64"
LICENSE="AGPL-3 Apache-2.0 BSD BSD-2 GPL-3 MIT"
SLOT="0"
IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""
src_compile() {
# Flags -w, -s: Omit debugging information to reduce binary size,
# see https://golang.org/cmd/link/.
local mygobuildargs=(
-ldflags="-X ${EGO_PN}/config.GitCommit=${GIT_COMMIT} -s -w"
-mod mod -v -work -x
)
go build "${mygobuildargs[@]}" . || die "go build failed"
}
src_install() {
newbin ${PN} q-tool
}
pkg_postinst() {
if [[ -z "${REPLACING_VERSION}" ]]; then
elog ""
elog "Please note that the binary is renamed to"
elog "\"q-tool\" as app-portage/portage-utils"
elog "already installs the \"q\" binary."
fi
}