diff options
-rw-r--r-- | sys-cluster/zookeepercli/Manifest | 3 | ||||
-rw-r--r-- | sys-cluster/zookeepercli/metadata.xml | 11 | ||||
-rw-r--r-- | sys-cluster/zookeepercli/zookeepercli-1.0.10.ebuild | 65 |
3 files changed, 79 insertions, 0 deletions
diff --git a/sys-cluster/zookeepercli/Manifest b/sys-cluster/zookeepercli/Manifest new file mode 100644 index 000000000000..a596804b074d --- /dev/null +++ b/sys-cluster/zookeepercli/Manifest @@ -0,0 +1,3 @@ +DIST go-zookeeper-218e9c81c0dd8b3b18172b2bbfad92cc7d6db55f.tar.gz 29301 SHA256 f90c7f318c92b9ad6fee417af842d9b9fc5b6635121e3f8035e236272ad41f28 SHA512 0fda62feaa668b43bdc7866270780b30069d7dace5c25c69d27d5df17bc3331885c9a7d3575b822c4da712e8a4af0465c6370cd3e89f6c39e73d70aed346d599 WHIRLPOOL f02c8c9edbf464111bc3302e23c986a73f7bc6684fb0e37136822cb910fc92136e0e2ca65420bcf98dce02245b42951acce17b0a062c4a0eb01df5b2b103e61f +DIST golib-2418949ac30d9933e7412ccce41f1aa2ae8d5ae8.tar.gz 5892 SHA256 cf524e0dcb1dfd664b668950bf459288f98f92630ef943af8670cd6e3c78e39c SHA512 924b9e296f5d0051f321115b542603653d8868d3bc8cb933b16eaa511c34bb9869fc763ea2f2261a71e8dbe06c5e1963ff202986f496d7d889a55ae7694704ec WHIRLPOOL a099036eabe3bb62b7cc0dedb34c960531b0c3fa0a197f49a86d4c3d6ab80a95bb8b4ec8359b4d2f6c72ac7843184f9b4b182ff4d1d89e8f18aae76fdd1689dd +DIST zookeepercli-1.0.10.tar.gz 11942 SHA256 2a32f1c1706e1df20f6229c163d42e2b0c3e4c2793e0a2ae71cb7add25cb28c5 SHA512 793de5eb2b62265a97c6e82f14c7ba1f9d32dacb86a02375a18ca6cbf472d5b7649e94107e3c497e81d4b81f7131b85032ba100c2d8f14a47fd8fc972c6be47d WHIRLPOOL 60a0cb4f9b3dc512d3dfef1440e4ae677d54601df3877013fa00d8ffe205d66c3d74c71b9956f55eebece56ef4421ae1d01d0fec0b8a2ee053bd6ec2bc814ad9 diff --git a/sys-cluster/zookeepercli/metadata.xml b/sys-cluster/zookeepercli/metadata.xml new file mode 100644 index 000000000000..81b3c8f181ff --- /dev/null +++ b/sys-cluster/zookeepercli/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">outbrain/zookeepercli</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-cluster/zookeepercli/zookeepercli-1.0.10.ebuild b/sys-cluster/zookeepercli/zookeepercli-1.0.10.ebuild new file mode 100644 index 000000000000..d86f03b1d162 --- /dev/null +++ b/sys-cluster/zookeepercli/zookeepercli-1.0.10.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit golang-build + +KEYWORDS="~amd64" +EGO_PN="github.com/outbrain/zookeepercli/..." +EGIT_COMMIT="v${PV}" +SRC_URI="https://${EGO_PN%/*}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz +https://github.com/outbrain/golib/archive/2418949ac30d9933e7412ccce41f1aa2ae8d5ae8.tar.gz -> golib-2418949ac30d9933e7412ccce41f1aa2ae8d5ae8.tar.gz +https://github.com/samuel/go-zookeeper/archive/218e9c81c0dd8b3b18172b2bbfad92cc7d6db55f.tar.gz -> go-zookeeper-218e9c81c0dd8b3b18172b2bbfad92cc7d6db55f.tar.gz" +DESCRIPTION="Simple, lightweight, dependable CLI for ZooKeeper" +HOMEPAGE="https://${EGO_PN%/*}" +LICENSE="Apache-2.0" +SLOT="0/${PVR}" +IUSE="" + +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 "${S}/src/${go_package%/*}" + for x in ${go_package##*/}-*; do + [[ ${x} -ef ${S} ]] && continue + mv "${x}" "${S}/src/${go_package}" || die + done + fi + done +} + +src_unpack() { + unpack_go_packages +} + +src_compile() { + GOPATH="${WORKDIR}/${P}" \ + go install -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}" || die +} + +golang_install_pkgs() { + insopts -m0644 -p # preserve timestamps for bug 551486 + dobin "${S}/bin/zookeepercli" + 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%/*} + insinto "$(dirname "${EPREFIX}$(get_golibdir)/src/${EGO_PN%/*}")" + doins -r "${S}"/src/${EGO_PN%/*} +} |