pentoo-overlay/app-text/unfurl/unfurl-0.2.0.ebuild
2021-03-07 10:00:18 +08:00

40 lines
785 B
Bash

# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EGO_PN=github.com/tomnomnom/${PN}
EGO_VENDOR=(
"github.com/jakewarren/tldomains dd0852eb6e50"
)
inherit golang-vcs-snapshot
if [[ ${PV} = *9999* ]]; then
inherit golang-vcs
else
KEYWORDS="amd64 x86"
EGIT_COMMIT="v${PV}"
SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
${EGO_VENDOR_URI}"
fi
DESCRIPTION="Pull out bits of URLs provided on stdin"
HOMEPAGE="https://github.com/tomnomnom/unfurl"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND=""
RDEPEND=""
src_compile() {
GOPATH="${S}:$(get_golibdir_gopath)" \
GOCACHE="${T}/go-cache" \
go build -v -work -x -ldflags="-s -w" "${EGO_PN}" || die
}
src_install(){
dobin unfurl
}