# Copyright 2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit git-r3 go-module DESCRIPTION="command-line DNS query client" HOMEPAGE="https://git.froth.zone/sam/awl" EGIT_REPO_URI="https://git.froth.zone/sam/awl.git" RESTRICT="network-sandbox strip" LICENSE="BSD MIT Unlicense CC0-1.0" SLOT="0" BDEPEND="app-text/scdoc" 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" } 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 }