dev-go/mysql: new package

Package-Manager: Portage-2.3.13, Repoman-2.3.3
This commit is contained in:
nemunaire 2018-01-27 13:34:14 +01:00
parent a2fe1e9cae
commit 92e32909c3
3 changed files with 56 additions and 0 deletions

2
dev-go/mysql/Manifest Normal file
View File

@ -0,0 +1,2 @@
EBUILD mysql-9999.ebuild 959 SHA256 69c48c69010a1c6109118ca677a7380aef4c30a295c3ecdde72c8b55156a771e SHA512 fc7972a9475e99846f3df3f39c51301002c420f173f32232cd90d7decdbc0d77bf4fecb946c17d679d1bac7c17462d839ee8ce8cf9f91704049bd11e0264a7c9 WHIRLPOOL 25309edc3588dd780f98b2e41ee765a80cf02d051539d1bd2eb316a25c979acbef632c96ba94686f706a05261666032c4d8c03bb5ddfc0fe4c0d04a6595378fc
MISC metadata.xml 526 SHA256 a1320a59eca4b55a44de33f24f281673b59c5d8257c2d6dcff5fccc5a86e8050 SHA512 d2b7f05e90414295782c1d38b9ab4357e54840da5c7b2623d341f4f1c4fc895ca84be21bcaca432883bc43b19aca6bce99fc0511e237b16218f384f5160bb8a8 WHIRLPOOL 917464bacb77ca5aee1ab97058a738df92421233e65c062eff4982b4eda250d1b8e0de2ccb1e574d310c2c5fa9dc3f386fd5abca628220ac10024100bc6bcf0e

16
dev-go/mysql/metadata.xml Normal file
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>

View File

@ -0,0 +1,38 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit golang-build golang-vcs-snapshot
EGO_PN="github.com/go-sql-driver/mysql/..."
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="Go mysql driver for database/sql package"
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
}