summaryrefslogtreecommitdiff
path: root/dev-go
diff options
context:
space:
mode:
Diffstat (limited to 'dev-go')
-rw-r--r--dev-go/go-resiliency/ChangeLog10
-rw-r--r--dev-go/go-resiliency/go-resiliency-1.0.0.ebuild58
-rw-r--r--dev-go/go-resiliency/go-resiliency-9999.ebuild58
-rw-r--r--dev-go/go-resiliency/metadata.xml10
4 files changed, 136 insertions, 0 deletions
diff --git a/dev-go/go-resiliency/ChangeLog b/dev-go/go-resiliency/ChangeLog
new file mode 100644
index 000000000000..764c2bea56ac
--- /dev/null
+++ b/dev-go/go-resiliency/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for dev-go/go-resiliency
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-go/go-resiliency/ChangeLog,v 1.1 2015/07/30 20:40:30 zmedico Exp $
+
+*go-resiliency-1.0.0 (30 Jul 2015)
+*go-resiliency-9999 (30 Jul 2015)
+
+ 30 Jul 2015; Zac Medico <zmedico@gentoo.org> +go-resiliency-1.0.0.ebuild,
+ +go-resiliency-9999.ebuild, +metadata.xml:
+ Add go-resiliency.
diff --git a/dev-go/go-resiliency/go-resiliency-1.0.0.ebuild b/dev-go/go-resiliency/go-resiliency-1.0.0.ebuild
new file mode 100644
index 000000000000..e26b794e274f
--- /dev/null
+++ b/dev-go/go-resiliency/go-resiliency-1.0.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-go/go-resiliency/go-resiliency-1.0.0.ebuild,v 1.1 2015/07/30 20:40:30 zmedico Exp $
+
+EAPI=5
+
+EGO_SRC=github.com/eapache/go-resiliency
+EGO_PN=${EGO_SRC}/...
+
+if [[ ${PV} = *9999* ]]; then
+ inherit golang-vcs
+else
+ KEYWORDS="~amd64"
+ SRC_URI="https://${EGO_SRC}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+inherit golang-build
+
+DESCRIPTION="Resiliency patterns for golang"
+HOMEPAGE="https://${EGO_SRC}"
+LICENSE="BSD"
+SLOT="0/${PV}"
+IUSE=""
+DEPEND=""
+RDEPEND=""
+
+if [[ ${PV} != *9999* ]]; then
+src_unpack() {
+ local f
+
+ for f in ${A}
+ do
+ case "${f}" in
+ *.tar|*.tar.gz|*.tar.bz2|*.tar.xz)
+ local destdir=${WORKDIR}/${P}/src/${EGO_SRC}
+
+ debug-print "${FUNCNAME}: unpacking ${f} to ${destdir}"
+
+ # XXX: check whether the directory structure inside is
+ # fine? i.e. if the tarball has actually a parent dir.
+ mkdir -p "${destdir}" || die
+ tar -C "${destdir}" -x --strip-components 1 \
+ -f "${DISTDIR}/${f}" || die
+ ;;
+ *)
+ debug-print "${FUNCNAME}: falling back to unpack for ${f}"
+
+ # fall back to the default method
+ unpack "${f}"
+ ;;
+ esac
+ done
+}
+fi
+
+src_install() {
+ rm -rf src/${EGO_SRC}/.git* || die
+ golang-build_src_install
+}
diff --git a/dev-go/go-resiliency/go-resiliency-9999.ebuild b/dev-go/go-resiliency/go-resiliency-9999.ebuild
new file mode 100644
index 000000000000..f275ee0f2c37
--- /dev/null
+++ b/dev-go/go-resiliency/go-resiliency-9999.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-go/go-resiliency/go-resiliency-9999.ebuild,v 1.1 2015/07/30 20:40:30 zmedico Exp $
+
+EAPI=5
+
+EGO_SRC=github.com/eapache/go-resiliency
+EGO_PN=${EGO_SRC}/...
+
+if [[ ${PV} = *9999* ]]; then
+ inherit golang-vcs
+else
+ KEYWORDS="~amd64"
+ SRC_URI="https://${EGO_SRC}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+inherit golang-build
+
+DESCRIPTION="Resiliency patterns for golang"
+HOMEPAGE="https://${EGO_SRC}"
+LICENSE="BSD"
+SLOT="0/${PV}"
+IUSE=""
+DEPEND=""
+RDEPEND=""
+
+if [[ ${PV} != *9999* ]]; then
+src_unpack() {
+ local f
+
+ for f in ${A}
+ do
+ case "${f}" in
+ *.tar|*.tar.gz|*.tar.bz2|*.tar.xz)
+ local destdir=${WORKDIR}/${P}/src/${EGO_SRC}
+
+ debug-print "${FUNCNAME}: unpacking ${f} to ${destdir}"
+
+ # XXX: check whether the directory structure inside is
+ # fine? i.e. if the tarball has actually a parent dir.
+ mkdir -p "${destdir}" || die
+ tar -C "${destdir}" -x --strip-components 1 \
+ -f "${DISTDIR}/${f}" || die
+ ;;
+ *)
+ debug-print "${FUNCNAME}: falling back to unpack for ${f}"
+
+ # fall back to the default method
+ unpack "${f}"
+ ;;
+ esac
+ done
+}
+fi
+
+src_install() {
+ rm -rf src/${EGO_SRC}/.git* || die
+ golang-build_src_install
+}
diff --git a/dev-go/go-resiliency/metadata.xml b/dev-go/go-resiliency/metadata.xml
new file mode 100644
index 000000000000..009c68c39330
--- /dev/null
+++ b/dev-go/go-resiliency/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>
+ <email>zmedico@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">eapache/go-resiliency</remote-id>
+ </upstream>
+</pkgmetadata>