dev-go/httprouter: new package

This commit is contained in:
nemunaire 2019-09-01 17:57:34 +02:00
parent 09b9160b21
commit a9f4b1bb02
3 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,2 @@
EBUILD httprouter-9999.ebuild 976 BLAKE2B f3af7a76e0a1c37d0d2472b5438fbc1d8e2144038a38a56395834f2d8b8e33fadc78f1e657dcdba5b885f0c610479fc3164bf205e0f1d0ee84feefd7ce722f3b SHA512 af0364c6d5a889da84b7837bbfb1c9e6b697f9bd72968d2200babf86748dfc1cb231957eab4b0e63a527167b6eee4aa33645638404285422ea1b658078115c87
MISC metadata.xml 526 BLAKE2B 1761f85651f85ecb1e0ac3b02535f041fbb754d5276480fc33b6b3a5611f8f6e9bc242b2825b2e318082143a98ebaa0f75bb818885bd6b394a4cf6a78e279975 SHA512 d2b7f05e90414295782c1d38b9ab4357e54840da5c7b2623d341f4f1c4fc895ca84be21bcaca432883bc43b19aca6bce99fc0511e237b16218f384f5160bb8a8

View 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
}

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>nemunaire@nemunai.re</email>
<name>Pierre-Olivier Mercier</name>
</maintainer>
<maintainer type="project">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<upstream>
<remote-id type="github">go-sql-driver/mysql</remote-id>
<bugs-to>https://github.com/go-sql-driver/mysql/issues</bugs-to>
</upstream>
</pkgmetadata>