summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2016-11-06 19:43:57 -0800
committerZac Medico <zmedico@gentoo.org>2016-11-06 20:09:23 -0800
commiteb5698c5f81e0c70cc921133ae47c293be35211d (patch)
tree141b28c260de5760a7c81b40c93cac678e21df32 /net-fs
parentdev-python/bitstring: cleaning 3.1.1 which was on googlecode (diff)
downloadgentoo-eb5698c5f81e0c70cc921133ae47c293be35211d.tar.gz
gentoo-eb5698c5f81e0c70cc921133ae47c293be35211d.tar.bz2
gentoo-eb5698c5f81e0c70cc921133ae47c293be35211d.zip
net-fs/torus: add package
Package-Manager: portage-2.3.2
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/torus/Manifest3
-rw-r--r--net-fs/torus/metadata.xml11
-rw-r--r--net-fs/torus/torus-0.1.2.ebuild83
3 files changed, 97 insertions, 0 deletions
diff --git a/net-fs/torus/Manifest b/net-fs/torus/Manifest
new file mode 100644
index 000000000000..bce1aad0dad1
--- /dev/null
+++ b/net-fs/torus/Manifest
@@ -0,0 +1,3 @@
+DIST glide-0.10.2.tar.gz 204775 SHA256 f0153d88f12fb36419cb616d9922ae95b274ac7c9ed9b043701f187da5834eac SHA512 5e8ecf20de7ce53236d16e52e98acf46f4611d84b742665009d4aea44efe9ba09344f9fe5a6d3f6d6b67ba168ac0f825f620ea419a24ddd826a3ecd83aeea320 WHIRLPOOL 5ea7e59e06cb88c080fcd11af090188a1df8c1dfc8503c0a7c70cc57522b8cedcddc9f1a8fba5ad0c1236f3635d4a8038121f038674f840e44e22d3fe8bbccb2
+DIST gogo-protobuf-0.3.tar.gz 2116795 SHA256 82222a5ad3bdc53fb60851df05acc16e7578932984c78e32abd05cb610127308 SHA512 57e1b1715d4811800da8cf9f2c72d202deae622d89715d7eff2ff0c406a0ea3778c187443abb17b072ae6fe57382844807f103837032759dab5420c860b99fb8 WHIRLPOOL 2c900a93d698d946949e8ef830c9940ea43c8faaf667eec7ec99ad58f46e5de9e59e43182d675f419196caacb08af2a49e63146998c5ccbef379c3920997511f
+DIST torus-0.1.2.tar.gz 8319943 SHA256 1639ff6dc739daa44259bf8fe7573301702fae86d136a89e00401122d37f9018 SHA512 46d56f560d92cf0b0c357d57d5249584f9a8444dc6bb0c3e00db3a288eea496fbc19c73be87ac9d534a4707ed74769e91354c95bac4b354fc62104a006239912 WHIRLPOOL c12151246943d25304e3074baa4616d478626ff9a0a092dbbf31ba35e2ca265257f2ef6438d64c4e65535b61d32b7b9c5a65b41209c0683f2e8f95aef50b0258
diff --git a/net-fs/torus/metadata.xml b/net-fs/torus/metadata.xml
new file mode 100644
index 000000000000..d39e23bd6dca
--- /dev/null
+++ b/net-fs/torus/metadata.xml
@@ -0,0 +1,11 @@
+<?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>
+ <name>Zac Medico</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">coreos/torus</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/torus/torus-0.1.2.ebuild b/net-fs/torus/torus-0.1.2.ebuild
new file mode 100644
index 000000000000..2c7e7746a5b8
--- /dev/null
+++ b/net-fs/torus/torus-0.1.2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+EGO_PN="github.com/coreos/${PN}/..."
+SRC_URI="https://${EGO_PN}/releases/download/v${PV}/${PN}_v${PV}_src.tar.gz -> ${P}.tar.gz
+ https://github.com/Masterminds/glide/archive/0.10.2.tar.gz -> glide-0.10.2.tar.gz
+ test? ( https://github.com/gogo/protobuf/archive/v0.3.tar.gz -> gogo-protobuf-0.3.tar.gz )"
+
+DESCRIPTION="A distributed storage system coordinated through etcd"
+HOMEPAGE="https://${EGO_PN%/*}"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc test"
+
+DEPEND=">=dev-lang/go-1.6:="
+RDEPEND=""
+
+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://}
+ uri=${uri%/archive/*}
+ case ${uri} in
+ ${EGO_PN%/*}*)
+ echo "${EGO_PN%/*}|${PN}_*"
+ ;;
+ *)
+ echo "${uri}|${uri##*/}-*"
+ ;;
+ esac
+}
+
+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})
+ x=${go_package#*|}
+ go_package=${go_package%|*}
+ mkdir -p src/${go_package%/*}
+ mv ${x} src/${go_package} || die
+ fi
+ done
+}
+
+src_unpack() {
+ mkdir "${S}" || die
+ cd "${S}" || die
+ unpack_go_packages
+}
+
+src_compile() {
+ GOPATH="${S}" go install -v -work -x github.com/Masterminds/glide/... || die
+ mkdir -p "${S}/src/${EGO_PN%/*}/tools" || die
+ mv "${S}/bin/glide" "${S}/src/${EGO_PN%/*}/tools/glide" || die
+ GOPATH="${S}" \
+ emake -C "${S}/src/${EGO_PN%/*}" VERSION=v${PV} build
+}
+
+src_test() {
+ GOPATH="${S}" \
+ emake -C "${S}/src/${EGO_PN%/*}" VERSION=v${PV} test
+}
+
+src_install() {
+ cd "${S}/src/${EGO_PN%/*}"|| die
+ dobin bin/${PN}*
+ dodoc README.md
+ use doc && dodoc -r Documentation
+}