dev-go/httprouter: new package
This commit is contained in:
parent
09b9160b21
commit
a9f4b1bb02
3 changed files with 56 additions and 0 deletions
38
dev-go/httprouter/httprouter-9999.ebuild
Normal file
38
dev-go/httprouter/httprouter-9999.ebuild
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit golang-build golang-vcs-snapshot
|
||||
|
||||
EGO_PN="github.com/julienschmidt/httprouter/..."
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
inherit golang-vcs
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="https://${EGO_PN%/*}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
DESCRIPTION="A high performance HTTP request router that scales well"
|
||||
HOMEPAGE="https://${EGO_PN%/*}"
|
||||
LICENSE="MPL-2.0"
|
||||
SLOT="0/${PVR}"
|
||||
IUSE=""
|
||||
|
||||
src_compile() {
|
||||
GOPATH="${S}" \
|
||||
go install -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}" || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
golang_install_pkgs
|
||||
}
|
||||
|
||||
golang_install_pkgs() {
|
||||
insinto $(dirname "${EPREFIX}$(get_golibdir)/src/${EGO_PN%/*}")
|
||||
rm -rf "${S}"/src/${EGO_PN%/*}/.git*
|
||||
doins -r "${S}"/src/${EGO_PN%/*}
|
||||
insinto $(dirname "${EPREFIX}$(get_golibdir)/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_PN%/*}")
|
||||
doins -r "${S}"/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_PN%/*}.a
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue