gentoo-overlay/app-crypt/lego/lego-2.4.0.ebuild

33 lines
832 B
Bash

# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EGO_PN="github.com/go-acme/lego"
inherit golang-build golang-vcs-snapshot
KEYWORDS="amd64"
DESCRIPTION="Let's Encrypt client and ACME library written in Go"
HOMEPAGE="https://go-acme.github.io/lego/"
SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
IUSE="selinux"
RDEPEND="selinux? ( sec-policy/selinux-lego )"
src_compile() {
export GOPATH="${S}:$(get_golibdir_gopath)"
cd src/${EGO_PN} || die
go build -ldflags="-s -X main.version=${PV}" -o dist/lego ./cmd/lego/ || die
}
src_install() {
pushd src/${EGO_PN} >& /dev/null || die
dobin dist/${PN}
popd >& /dev/null || die
}