diff options
author | Zac Medico <zmedico@gentoo.org> | 2016-10-26 09:38:06 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2016-10-26 09:55:53 -0700 |
commit | 158fbcb00a0b94d0acfaab33ffc71a4c971df315 (patch) | |
tree | 299078b830a587571e9c1b76c7f000df463b01b9 /app-emulation/docker-machine-kvm | |
parent | dev-perl/DBD-Pg: arm stable, bug #595954 (diff) | |
download | gentoo-158fbcb00a0b94d0acfaab33ffc71a4c971df315.tar.gz gentoo-158fbcb00a0b94d0acfaab33ffc71a4c971df315.tar.bz2 gentoo-158fbcb00a0b94d0acfaab33ffc71a4c971df315.zip |
app-emulation/docker-machine-kvm: add package
Package-Manager: portage-2.3.2
Diffstat (limited to 'app-emulation/docker-machine-kvm')
-rw-r--r-- | app-emulation/docker-machine-kvm/Manifest | 3 | ||||
-rw-r--r-- | app-emulation/docker-machine-kvm/docker-machine-kvm-0.7.0.ebuild | 71 | ||||
-rw-r--r-- | app-emulation/docker-machine-kvm/metadata.xml | 10 |
3 files changed, 84 insertions, 0 deletions
diff --git a/app-emulation/docker-machine-kvm/Manifest b/app-emulation/docker-machine-kvm/Manifest new file mode 100644 index 000000000000..d7fd45dfa636 --- /dev/null +++ b/app-emulation/docker-machine-kvm/Manifest @@ -0,0 +1,3 @@ +DIST docker-machine-0.8.2.tar.gz 2928577 SHA256 6ca75b2995f57505901da2f45ce422c782b73d89054cc10868100b3404ccfd05 SHA512 3fa683f74466e30616495b8e635e28be0c7557e17940bc4f3f8598a755463b5ae75e64405281325e2028aee5a3e06744329d9bf0a7b6ade200f3d3c51ba2fe80 WHIRLPOOL 37d9ddd2a946ee890bb771b304be692385e0ef1f53ef8ed100f2860e7cab7b825093a2d7b4c3bfa8b78193df1ab7ec9d16817aef1985a48ae1b97b666051cf96 +DIST docker-machine-kvm-0.7.0.tar.gz 6975 SHA256 25fae12f952faa155e1141e2f0ab196ebcd22b7691848e1022d54faa806e998f SHA512 8b58806d3afc58f28d483df8644d3d734407c931a9e6b2c055589d500de115b88693928f73fccb9f2ebe7b01cdd1b473e3e3654c9867d102f60d0fa72ff97d4e WHIRLPOOL dbd0d6048d202b548d45a3261d6c4cf129dad5beeb61108a220ba6b4939e57f04c054624c95c3121a3fc964be02ea4edbc14b9b762bbe9317cb9c8cac21ded00 +DIST libvirt-go-2.13.0.tar.gz 42994 SHA256 e75d5fa2509f10fb2d5a88e7570397cb7de69ecd8424a2859bd73abc4495d864 SHA512 5a5c8a2fc57c2818455fdb0ea13f98abc7d15c139ccdc692e562fddfd7152653635f1955ebad61b94202a706b94b45cb783a9e6387eef0a00c528cb2f0663fb0 WHIRLPOOL 8ff6553ac55805234a4496d21c0a2d7782d20c301c7f4271b92a14b538ad5bb5c27f9b98eac868815f691fed05f579f95d6638b923a7c2c2788f02169a09deb8 diff --git a/app-emulation/docker-machine-kvm/docker-machine-kvm-0.7.0.ebuild b/app-emulation/docker-machine-kvm/docker-machine-kvm-0.7.0.ebuild new file mode 100644 index 000000000000..dbc0674feece --- /dev/null +++ b/app-emulation/docker-machine-kvm/docker-machine-kvm-0.7.0.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit golang-base + +KEYWORDS="~amd64" +DESCRIPTION="KVM driver for docker-machine" +EGO_PN="github.com/dhiltgen/${PN}/..." +HOMEPAGE="http://${EGO_PN%/*}" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" +COMMON_DEPEND="app-emulation/libvirt:=[qemu,virt-network]" +DEPEND=">=dev-lang/go-1.6:= + ${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" + +SRC_URI="https://${EGO_PN%/*}/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/rgbkrk/libvirt-go/archive/v2.13.0.tar.gz -> libvirt-go-2.13.0.tar.gz + https://github.com/docker/machine/archive/v0.8.2.tar.gz -> docker-machine-0.8.2.tar.gz" + +get_archive_go_package() { + local archive=${1} uri x + for x in ${SRC_URI}; do + if [[ ${x} == http* ]]; then + uri=${x} + elif [[ ${x} == ${archive} ]]; then + break + fi + done + uri=${uri#https://} + echo ${uri%/archive/*} +} + +unpack_go_packages() { + local go_package x + # Unpack packages to appropriate locations for GOPATH + for x in ${A}; do + unpack ${x} + if [[ ${x} == *.tar.gz ]]; then + go_package=$(get_archive_go_package ${x}) + mkdir -p src/${go_package%/*} + mv ${go_package##*/}-* src/${go_package} || die + fi + done +} + +src_unpack() { + mkdir "${S}" && cd "${S}" || die + unpack_go_packages +} + +src_prepare() { + eapply_user + sed -e 's|alexzorin|rgbkrk|g' -i src/${EGO_PN%/*}/kvm.go || die +} + +src_compile() { + export GOPATH=${S} + cd "${S}"/src/${EGO_PN%/*}/bin || die + emake || die +} + + +src_install() { + dobin "${S}/src/${EGO_PN%/*}/bin/${PN/kvm/driver-kvm}" + dodoc "${S}/src/${EGO_PN%/*}/README.md" +} diff --git a/app-emulation/docker-machine-kvm/metadata.xml b/app-emulation/docker-machine-kvm/metadata.xml new file mode 100644 index 000000000000..92a59d8fc1b9 --- /dev/null +++ b/app-emulation/docker-machine-kvm/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zmedico@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">dhiltgen/docker-machine-kvm</remote-id> + </upstream> +</pkgmetadata> |