diff options
author | Zac Medico <zmedico@gentoo.org> | 2016-01-24 01:58:12 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2016-01-24 02:24:39 -0800 |
commit | bad526aee3b89eb09d7f48d042e3943c0064027b (patch) | |
tree | 185dd59d5258e3e8bdc6f85e07b74fef40ee34cc /app-admin/consul-replicate | |
parent | dev-ruby/totoridipjp: add new package (diff) | |
download | gentoo-bad526aee3b89eb09d7f48d042e3943c0064027b.tar.gz gentoo-bad526aee3b89eb09d7f48d042e3943c0064027b.tar.bz2 gentoo-bad526aee3b89eb09d7f48d042e3943c0064027b.zip |
app-admin/consul-replicate: new package, Consul cross-DC KV replication daemon
Package-Manager: portage-2.2.27
Diffstat (limited to 'app-admin/consul-replicate')
-rw-r--r-- | app-admin/consul-replicate/Manifest | 11 | ||||
-rw-r--r-- | app-admin/consul-replicate/consul-replicate-0.2.0.ebuild | 87 | ||||
-rw-r--r-- | app-admin/consul-replicate/metadata.xml | 10 |
3 files changed, 108 insertions, 0 deletions
diff --git a/app-admin/consul-replicate/Manifest b/app-admin/consul-replicate/Manifest new file mode 100644 index 000000000000..03b72fd86a44 --- /dev/null +++ b/app-admin/consul-replicate/Manifest @@ -0,0 +1,11 @@ +DIST consul-replicate-0.2.0.tar.gz 24575 SHA256 64028b79994407f8d0d0b858a064d0bb9cbecf1e889f55b74a0f6a2c0cb63f6e SHA512 af1bdc0747524996a1cffe989d05a265c0fbcfac9d4d7c4b4bcf94dbd3db6f7635cb013cf542e1cdad049975a8dfad2bca417dd5566c922b7f86e7fd451ea0a2 WHIRLPOOL efac8709e6efa87b8aca5342d5bfaf752a22bca42a9a38cb9c4bada6855302a02140ef5bb06c27bf178081f7aef570a773c64b67ecec5f1e57c15c5a4d9c86c4 +DIST consul-template-0.8.0.tar.gz 63281 SHA256 ac12bdde35e88184d5e3f2201c2f46e2dd7b301d4f31b51945905d1b2c456064 SHA512 4a738aa70a291df6e7a48e40fd73c70e279bb957d988de1277b1223dfe151867e06de28542fdbd9fd7f816650b150ed53989fc061fc228b930551fcd0b3005fb WHIRLPOOL e8e48972350d9bb617c72ba07b86823359b8e997494671a23d8d897861e9cfcf429d6edb4ce3fc117849a2fbf6a56aee35809b9db6d738460da34671cfc9c4a7 +DIST errwrap-7554cd9344cec97297fa6649b055a8c98c2a1e55.tar.gz 8320 SHA256 e77d6aa78ef6342b21358d689edcd043778c5623af5a9b2690ed8e3fa4ea7db0 SHA512 da45b1696253bebe012f3d0e624a63dd11ad1a613d81cc302f2ea6f096f29a8d81015b9c00363bd2590c4cacc59de52a27e84435a7b4ad6512485cdd87df11c0 WHIRLPOOL 5c6013d852711e001a0eca6a3ad11f64e006be527cfc0b46db21049af97506730b48cfe1b2fac10bcfc66f61dce69023f20b06c83558e80ce337d75a127aa90d +DIST go-cleanhttp-ce617e79981a8fff618bb643d155133a8f38db96.tar.gz 6595 SHA256 b0a0282baa30df0e77ebd0902c5f0043f9af3460172ff61070927c270fa8139d SHA512 bfdeea0c0aad4160729bb023c9c908ff56c7faa64a820b16e982efede0389365987343b2a227cac95edaa4c9096f2dfcb1fd3f7d55510328dfdb284cfbf7600a WHIRLPOOL 1cd82ed8a82a2cb1de58a9a0177fead214e63908e880b2d57a4434c024a49d05579ea77142aa9d5ecca370adc4539bfb7db1d9d4a2cc27fc41d83a350c4fce39 +DIST go-multierror-d30f09973e19c1dfcd120b2d9c4f168e68d6b5d5.tar.gz 8792 SHA256 734fdf39b7fb299ecf18e65f72ac3f1929bd978618af575e8bcad9e5ca55b494 SHA512 8a3e37ac07bbd571dd8b76bd8c119e5dbc620444e78a6f9fe2c4d28b0171a46704a0b088380ca201a08f7235698f07de4e4881691aef5370739c8bfe2db9e85b WHIRLPOOL 7b501d47880ad570dd79d2da79cc10373b03426f7f89b513f3b3b195682b0b36aeefac675a56070c262ee7e0d31ff9a564a9667924b1da66957ad0f97ab2d46c +DIST go-syslog-42a2b573b664dbf281bd48c3cc12c086b17a39ba.tar.gz 4397 SHA256 378f5249729661db9d0c65030fbf636f6ec1d60ee926e67abf8c6dd7921d3907 SHA512 42257d0599936bb215f4a9f9189518418f02bc43e4d7417823ea460bfc45c6fd1f9b0bf5a35dd73881b57cd9e892c702b813a68fe6e417e82dd31c6635c1b24e WHIRLPOOL 26cf1464bf0899ae9bad0067481f57a121433c5fe7c93fef92523a157d7906b8c1c4216c2a4fe738222e4afaa85fc0a7b7b29149254125a3e8b2e7064add6cb1 +DIST hcl-578dd9746824a54637686b51a41bad457a56bcef.tar.gz 54677 SHA256 5656a59a398dc22d383d8daf33c410dcc1c21894d0053df5f7263d3a65f85fd9 SHA512 a430b7a4be9147e0fad3d932ecaee5970f049991351654682c679ace971e883615f957255d81da3dc2f732b0bfa26d66eb73ec7811957f05c2f72c2c506c23cd WHIRLPOOL d6dddcfbc53bc68fdf3971829bf8f0662e47a447682b37306424dd91ee2cc3d0280c7c368b3a8ded9f2127b2789b7b68648de9beaf9f9847cedb7324c2605dbf +DIST logutils-0dc08b1671f34c4250ce212759ebd880f743d883.tar.gz 7717 SHA256 a58c8a6112b9ca2eb193d75996a54699f572411f3146d8ba62377af4a9fb933a SHA512 54e55f95808fb68be532e35076ffb04ff844a7d032530b82bbdd87f809bd1b0585538964cc22c7ae1cc039c5c30a02eca9734734c0c01ad76a14bd5a4c386426 WHIRLPOOL 0086485565e6fae835f54a1bb00a40660650c6018a6e79e05ba15120a59a6552ba60d86bfd63f7bc5cd8b331984fcdbe7162ef24d257bcc18a7fd8e6c028dd80 +DIST mapstructure-281073eb9eb092240d33ef253c404f1cca550309.tar.gz 13977 SHA256 3b2873f0e7e7a37f1b809493717033c1257bf41a9996e336746d83556df68240 SHA512 f495fe99c8ce752830b3d36db445cdc32baac6e266a0862d13e7e80e04f412ae7ee85e13ba794f1cfae3effb226007874c8ee819a4ef568ce2884077dfba4f9c WHIRLPOOL e3cf27de3f414014f9f068f66540daeeb90e10d69196a117a1e3a06c02cd096f5d711657c19c8ffdc26bf6a399a45fb9f78e96e26335f788baf7695785b7b90f +DIST serf-64d10e9428bd70dbcd831ad087573b66731c014b.tar.gz 579000 SHA256 6c74d90b84c402c684e27a8948ba54074ad368ed121945d21b9c00135cdf7c74 SHA512 eced133c2ba261e4e39d16f2252f555611e90f23f70a746a6f8d60b24e6747e73e619ec74f10a1c0646ec5edfd731cd79f6700d9bc5fb7b100723aac32203a5f WHIRLPOOL eaa15ec8dcdfeeb490cea4e9af24c8507dba09583f5e02919fd71607bfed8c999f872d3c8dd818378f79ade5fd065e1c2e270dda8ff428848c409f7922196478 +DIST structs-a924a2250d1033753512e95dce41dca3fd793ad9.tar.gz 12276 SHA256 f9998ee9ab32a55cfa7a9f93a9439ee56fc146d8aff6601f06bb2048b71c381a SHA512 ae2f0bc1f9e1ddbf1bd32d5e50a2ffbc4841c17d451739aee7cbbe359abac982e98a00caaff2aa433d10aad4dc414ce17e94a1d0893610ff53c52beddb21dd4f WHIRLPOOL cc4063c7463e261a32a84c357c352141a91e4a88874c02acd6f91bc05f478e668b5ad7629a7473009cebe201a789854f295b22d56310d39d632d81d223baec65 diff --git a/app-admin/consul-replicate/consul-replicate-0.2.0.ebuild b/app-admin/consul-replicate/consul-replicate-0.2.0.ebuild new file mode 100644 index 000000000000..fd943a87f439 --- /dev/null +++ b/app-admin/consul-replicate/consul-replicate-0.2.0.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit golang-base + +KEYWORDS="~amd64" +DESCRIPTION="Consul cross-DC KV replication daemon" +EGO_PN="github.com/hashicorp/${PN}/..." +HOMEPAGE="http://${EGO_PN%/*}" +LICENSE="MPL-2.0" +SLOT="0" +IUSE="test" + +DEPEND=">=dev-lang/go-1.4:=" +RDEPEND="" + +SRC_URI="https://${EGO_PN%/*}/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/hashicorp/consul-template/archive/v0.8.0.tar.gz -> consul-template-0.8.0.tar.gz + https://github.com/fatih/structs/archive/a924a2250d1033753512e95dce41dca3fd793ad9.tar.gz -> structs-a924a2250d1033753512e95dce41dca3fd793ad9.tar.gz + https://github.com/hashicorp/errwrap/archive/7554cd9344cec97297fa6649b055a8c98c2a1e55.tar.gz -> errwrap-7554cd9344cec97297fa6649b055a8c98c2a1e55.tar.gz + https://github.com/hashicorp/go-cleanhttp/archive/ce617e79981a8fff618bb643d155133a8f38db96.tar.gz -> go-cleanhttp-ce617e79981a8fff618bb643d155133a8f38db96.tar.gz + https://github.com/hashicorp/go-multierror/archive/d30f09973e19c1dfcd120b2d9c4f168e68d6b5d5.tar.gz -> go-multierror-d30f09973e19c1dfcd120b2d9c4f168e68d6b5d5.tar.gz + https://github.com/hashicorp/go-syslog/archive/42a2b573b664dbf281bd48c3cc12c086b17a39ba.tar.gz -> go-syslog-42a2b573b664dbf281bd48c3cc12c086b17a39ba.tar.gz + https://github.com/hashicorp/hcl/archive/578dd9746824a54637686b51a41bad457a56bcef.tar.gz -> hcl-578dd9746824a54637686b51a41bad457a56bcef.tar.gz + https://github.com/hashicorp/logutils/archive/0dc08b1671f34c4250ce212759ebd880f743d883.tar.gz -> logutils-0dc08b1671f34c4250ce212759ebd880f743d883.tar.gz + https://github.com/hashicorp/serf/archive/64d10e9428bd70dbcd831ad087573b66731c014b.tar.gz -> serf-64d10e9428bd70dbcd831ad087573b66731c014b.tar.gz + https://github.com/mitchellh/mapstructure/archive/281073eb9eb092240d33ef253c404f1cca550309.tar.gz -> mapstructure-281073eb9eb092240d33ef253c404f1cca550309.tar.gz" + +STRIP_MASK="*.a" +S="${WORKDIR}/src/${EGO_PN%/*}" + +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} + go_package=$(get_archive_go_package ${x}) + mkdir -p src/${go_package%/*} + mv ${go_package##*/}-* src/${go_package} || die + done +} + +src_unpack() { + unpack_go_packages + export GOPATH=${WORKDIR}:$(get_golibdir_gopath) +} + +src_prepare() { + # Create a writable GOROOT in order to avoid sandbox violations. + export GOROOT="${WORKDIR}/goroot" + cp -sR "${EPREFIX}"/usr/lib/go "${GOROOT}" || die + rm -rf "${GOROOT}"/{src,pkg/$(go env GOOS)_$(go env GOARCH)}/"${EGO_PN%/*}" || die + + # Prune conflicting libraries from GOROOT + while read -r -d '' x; do + x=${x#${WORKDIR}/src} + rm -rf "${GOROOT}/src/${x}" "${GOROOT}/pkg/$(go env GOOS)_$(go env GOARCH)/${x}"{,.a} || die + done < <(find "${WORKDIR}/src" -maxdepth 3 -mindepth 3 -type d -print0) + + sed -e 's:TestParseConfig_parseFileError(:_\0:' -i config_test.go || die +} + +src_compile() { + go build -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}" || die + go install -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}" || die +} + +src_install() { + dobin "${WORKDIR}/bin/${PN}" + dodoc CHANGELOG.md README.md +} diff --git a/app-admin/consul-replicate/metadata.xml b/app-admin/consul-replicate/metadata.xml new file mode 100644 index 000000000000..dd8c8da64294 --- /dev/null +++ b/app-admin/consul-replicate/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">hashicorp/consul-replicate</remote-id> + </upstream> +</pkgmetadata> |