32 lines
812 B
Bash
32 lines
812 B
Bash
|
# Copyright 1999-2017 Gentoo Foundation
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=6
|
||
|
|
||
|
EGO_PN="github.com/xenolf/lego"
|
||
|
|
||
|
inherit golang-build golang-vcs-snapshot
|
||
|
|
||
|
KEYWORDS="~amd64"
|
||
|
|
||
|
DESCRIPTION="Let's Encrypt client and ACME library written in Go"
|
||
|
HOMEPAGE="https://github.com/xenolf/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 bin/lego || die
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
pushd src/${EGO_PN} >& /dev/null || die
|
||
|
dobin bin/*
|
||
|
popd >& /dev/null || die
|
||
|
}
|