summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-admin/consul-template
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-admin/consul-template')
-rw-r--r--app-admin/consul-template/Manifest14
-rw-r--r--app-admin/consul-template/consul-template-0.9.0-r1.ebuild103
-rw-r--r--app-admin/consul-template/consul-template-0.9.0.ebuild103
-rw-r--r--app-admin/consul-template/consul-template-9999.ebuild69
-rw-r--r--app-admin/consul-template/files/consul-template.confd7
-rw-r--r--app-admin/consul-template/files/consul-template.initd25
-rw-r--r--app-admin/consul-template/files/consul-template.service15
-rw-r--r--app-admin/consul-template/files/localhost.json.example1
-rw-r--r--app-admin/consul-template/metadata.xml10
9 files changed, 347 insertions, 0 deletions
diff --git a/app-admin/consul-template/Manifest b/app-admin/consul-template/Manifest
new file mode 100644
index 000000000000..0cd0f9c1d7a0
--- /dev/null
+++ b/app-admin/consul-template/Manifest
@@ -0,0 +1,14 @@
+DIST consul-template-0.9.0.tar.gz 69085 SHA256 5277cc43b61d531630854d707cd7a51bdd84328d8c30bc330dd2e2aa8898ede8 SHA512 39da6029d818f3ee0b9aba332f0a645c9e381b1115549dcc6945245c4dee53cd3d503e3dc3da4c4394192989798b242994b53e3256755ffe02c4b3c9296139d3 WHIRLPOOL 1ba0d1c2a2a9c8617338901f85916e25460155979dda9604752bc62c289e40d904ad27f2c31ca2491936289519d4f09fe72bbe4c176035880f01c789fdf74db2
+DIST copystructure-6fc66267e9da7d155a9d3bd489e00dad02666dc6.tar.gz 4028 SHA256 4e7271e88e101ac324f799c421b1c8c1477d1f54048d6b6b1ff3930498870272 SHA512 3c804e126f676cb7a6c5af775b7fdf6a3b591b42315707ebb83a66a96f583eac414e01402bc489d9b218b64db7780f57bd5a4bd922aff59dca068b869f825de5 WHIRLPOOL 3be054304612292adef0361bbd2d94d51c4186d4a66bf949d326345da0f7f5c6f5558c0db62fb1ed1144899155f5c63ceeb9243c267b82605b024cf6898f31ba
+DIST errwrap-7554cd9344cec97297fa6649b055a8c98c2a1e55.tar.gz 8320 SHA256 e77d6aa78ef6342b21358d689edcd043778c5623af5a9b2690ed8e3fa4ea7db0 SHA512 da45b1696253bebe012f3d0e624a63dd11ad1a613d81cc302f2ea6f096f29a8d81015b9c00363bd2590c4cacc59de52a27e84435a7b4ad6512485cdd87df11c0 WHIRLPOOL 5c6013d852711e001a0eca6a3ad11f64e006be527cfc0b46db21049af97506730b48cfe1b2fac10bcfc66f61dce69023f20b06c83558e80ce337d75a127aa90d
+DIST go-metrics-a54701ebec11868993bc198c3f315353e9de2ed6.tar.gz 11268 SHA256 2f4206d5d50eaab383cdc4f5c57179e285b93649c028a69dd9e2a4a45b69afe3 SHA512 e3da3f7b98edd32da5c3381afc3e92021b92416d7ea9de0423a05c06bc9ff808e28d29ca9f689c0029809a4b1643819954039516d6ab5890bb5512f5fe99fd6d WHIRLPOOL 815f83ae08bb6a37ee1774a718a8c3b4087ee9a95f190b8a77453f0d1ba1ca88a331e8be12b2f63d0c1fdb9472f2ff35786b94eaf1f61f5cb33fe1e6d9e4e460
+DIST go-msgpack-71c2886f5a673a35f909803f38ece5810165097b.tar.gz 49485 SHA256 c32b90e67762a375981b38154cae65222bb1aaa7722727d0225d5f8de773e4c8 SHA512 e4141e664c3237f7ab4c283b110d04e933bfb36a9d57af374ab42fed00a4ad6d8399e3399b206eebe76c5e142746412b2ada6c20b1ec09088f3bb7d82a7b01a9 WHIRLPOOL 1434e72897de4063515a0d3319e96b066406c110e3e36f710970886ba6ec9411f71908d9696a4528ee0fcb88bea54ab9c064faa230761ce38b82bb5506a2c073
+DIST go-multierror-fcdddc395df1ddf4247c69bd436e84cfa0733f7e.tar.gz 8058 SHA256 af90f9be029c091eb011ff25d270772fdb51edf3c6396cf99f224c4e7ad724c3 SHA512 f5cb12407f9bc986867a274c623037edab04f8e2b664c7d4db3bb7e32f970dd073a3d233d18549a5f01b5e88abff0eb0c1fcf79b6696a531c208e6fe8137080e WHIRLPOOL c997792a5c1b3029b32d0fad3a55a281b5ced2bef306367a1fd49df75cab831b93a3752e76f8a18ce5d08e155f66b3826aa5d9878fb9655821cef7a69b71de31
+DIST go-radix-0bab926c3433cfd6490c6d3c504a7b471362390c.tar.gz 5446 SHA256 f4e628adceee06d7717dce0bf566d5ebd8c009599807f2436b3cda259011b331 SHA512 350904076752e2fda17e9c2891a50b037d2ca165924880d6d5e466b8ed76685d79ff00bbbfbe9a665668e0ebde23c87129d3c1c4bf27ffe0c034df160db9d08f WHIRLPOOL 8571b9e818904a56ea16c35883725013d2009dc294acfdf4f28920a03baff36ffcd3d4d6d8be0ecfc78eefbfeef57e4b2ca224f2ce37d665caae724389346f88
+DIST go-syslog-42a2b573b664dbf281bd48c3cc12c086b17a39ba.tar.gz 4397 SHA256 378f5249729661db9d0c65030fbf636f6ec1d60ee926e67abf8c6dd7921d3907 SHA512 42257d0599936bb215f4a9f9189518418f02bc43e4d7417823ea460bfc45c6fd1f9b0bf5a35dd73881b57cd9e892c702b813a68fe6e417e82dd31c6635c1b24e WHIRLPOOL 26cf1464bf0899ae9bad0067481f57a121433c5fe7c93fef92523a157d7906b8c1c4216c2a4fe738222e4afaa85fc0a7b7b29149254125a3e8b2e7064add6cb1
+DIST go-zookeeper-d0e0d8e11f318e000a8cc434616d69e329edc374.tar.gz 24950 SHA256 773f4428d6eb2bcc53726fc2af7f495d30fd6d962ed182b7ec2edc8f8ad55ef3 SHA512 c1ac076b2abf9106c185c29158fdf8b3a74ea41458f336b5ebc2f5f13168ec6f06be14cbc3df61c1307a0fa4381d2f4f7cd8b569411152ae748c7fe12896bd24 WHIRLPOOL 94bb9b02d4c7e8eafa0fce1d6d9b79a6cf8007d9774a42267cb92673a89d9c30e60a7eb4d2cd464fbdc5e2e644649d3a980a3c92d6badfbf092f99a99306729e
+DIST golang-lru-995efda3e073b6946b175ed93901d729ad47466a.tar.gz 7872 SHA256 cac6e889020e8b31e46d50b98e0af9acbb44bf352ad0ca9d30db79b6235849e2 SHA512 29eee70cbdc9c712d1cece1f911f3a74ebfd44318b91dcd1932f0bff031286f0a80db93772dd04be350c0cca3cc77c0676659ef0f85229f31a1140e23c1fc3f5 WHIRLPOOL c4711d30caf5c2d880aeec7330bc06011dc4e741e305f6dcac8d983734b3706cb5967b06755f7684370ca61a91f356a97c9866ffda0e275e26bb11d3a74d0145
+DIST hcl-513e04c400ee2e81e97f5e011c08fb42c6f69b84.tar.gz 28692 SHA256 109ec067ff8ff7f30538e0d2ba1384c1fe25694c99d56972003b1c669d19d0b2 SHA512 90f568373d20cccbb56ada29257bd2ea808bbacb668fd1b82e71abf8f5e2592b4a58dc5d3f1174a2b38c660316cd0227eb333e747aae7a846e94168ebe9d2297 WHIRLPOOL cf5685f25d3c3b69d330e30ad089e2cbc9c6636b0f2ac4933638d6bcad06aa5a50f92d5228a1f1ddabd5e0f8187bc5b16f38f4a3bd86bbbf161a5409d5102ec0
+DIST logutils-367a65d59043b4f846d179341d138f01f988c186.tar.gz 7704 SHA256 9b2173d9277574adbc45400101cb0b65534a5cd3defe62eeb3bff652eeb3e34c SHA512 9a4444fbae3bd1c0b2391981edf2f8155ebdd90a14a367f718bc7bcdced68b37b563ae38141fc3cb35409ff70820bd32b5a44cb218630418bce37f78181ef109 WHIRLPOOL 4973a7ef035807c9ef1135cface87cce4707910e6c33cece87dc8200df5e3d3c351d129ce20214e2cbf6bf58a7b040e9d1c5e12f5414cf37e45890a6a8ec439c
+DIST mapstructure-442e588f213303bec7936deba67901f8fc8f18b1.tar.gz 12220 SHA256 b4fa5d3b888734f849c5d6784fc1c5749e4ece168fda65c604676fca39c085d2 SHA512 de79f2579a086cccc047b280ae7e2b5dc5f8a95d504ead9d7f0cbaf01e70d37cb4eea8e7ab9aec446a7c2f1771152add3e2e488c18963d63ca3dac43ed2a33b7 WHIRLPOOL ecf8bd2bc9e50bb9e5ad3b6ebb04f5fdc10cf0e515f25d1381bbd1591c074887706b7c25f03a749ff212555fc537534056dab58eaece9357de9045ba2edd9a51
+DIST reflectwalk-242be0c275dedfba00a616563e6db75ab8f279ec.tar.gz 4290 SHA256 70ccfe92748dcc9e23460f6cedaeb4dd3f4807cc76241298b954beb71448cce6 SHA512 50ceea50f26307903138d5a0e0c395863ae662993a58d2053fce79ca49b0a17f9ba863adcdf4053cd9eb6592c91de02671be486ec4693449439b2b634be55fc1 WHIRLPOOL 4f88fd9ea461838acbf1344be39e9ecc1494ac8ae060917e27f16a6e5b19833b41be23dd8c0638c22933991b802f2f6dfc72e0bb772828bb43b020a08f22f1b1
diff --git a/app-admin/consul-template/consul-template-0.9.0-r1.ebuild b/app-admin/consul-template/consul-template-0.9.0-r1.ebuild
new file mode 100644
index 000000000000..fd646ee7809d
--- /dev/null
+++ b/app-admin/consul-template/consul-template-0.9.0-r1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit systemd user
+
+KEYWORDS="~amd64"
+DESCRIPTION="Generic template rendering and notifications with Consul"
+GO_PN="github.com/hashicorp/${PN}"
+HOMEPAGE="http://${GO_PN}"
+LICENSE="MPL-2.0"
+SLOT="0"
+IUSE="test"
+
+DEPEND=">=dev-lang/go-1.4:=
+ test? ( dev-go/go-tools )
+ app-admin/consul
+ app-admin/vault"
+RDEPEND=""
+
+SRC_URI="https://${GO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+https://github.com/hashicorp/go-multierror/archive/fcdddc395df1ddf4247c69bd436e84cfa0733f7e.tar.gz -> go-multierror-fcdddc395df1ddf4247c69bd436e84cfa0733f7e.tar.gz
+https://github.com/armon/go-radix/archive/0bab926c3433cfd6490c6d3c504a7b471362390c.tar.gz -> go-radix-0bab926c3433cfd6490c6d3c504a7b471362390c.tar.gz
+https://github.com/hashicorp/errwrap/archive/7554cd9344cec97297fa6649b055a8c98c2a1e55.tar.gz -> errwrap-7554cd9344cec97297fa6649b055a8c98c2a1e55.tar.gz
+https://github.com/armon/go-metrics/archive/a54701ebec11868993bc198c3f315353e9de2ed6.tar.gz -> go-metrics-a54701ebec11868993bc198c3f315353e9de2ed6.tar.gz
+https://github.com/hashicorp/go-msgpack/archive/71c2886f5a673a35f909803f38ece5810165097b.tar.gz -> go-msgpack-71c2886f5a673a35f909803f38ece5810165097b.tar.gz
+https://github.com/hashicorp/go-syslog/archive/42a2b573b664dbf281bd48c3cc12c086b17a39ba.tar.gz -> go-syslog-42a2b573b664dbf281bd48c3cc12c086b17a39ba.tar.gz
+https://github.com/hashicorp/golang-lru/archive/995efda3e073b6946b175ed93901d729ad47466a.tar.gz -> golang-lru-995efda3e073b6946b175ed93901d729ad47466a.tar.gz
+https://github.com/hashicorp/hcl/archive/513e04c400ee2e81e97f5e011c08fb42c6f69b84.tar.gz -> hcl-513e04c400ee2e81e97f5e011c08fb42c6f69b84.tar.gz
+https://github.com/hashicorp/logutils/archive/367a65d59043b4f846d179341d138f01f988c186.tar.gz -> logutils-367a65d59043b4f846d179341d138f01f988c186.tar.gz
+https://github.com/mitchellh/copystructure/archive/6fc66267e9da7d155a9d3bd489e00dad02666dc6.tar.gz -> copystructure-6fc66267e9da7d155a9d3bd489e00dad02666dc6.tar.gz
+https://github.com/mitchellh/mapstructure/archive/442e588f213303bec7936deba67901f8fc8f18b1.tar.gz -> mapstructure-442e588f213303bec7936deba67901f8fc8f18b1.tar.gz
+https://github.com/mitchellh/reflectwalk/archive/242be0c275dedfba00a616563e6db75ab8f279ec.tar.gz -> reflectwalk-242be0c275dedfba00a616563e6db75ab8f279ec.tar.gz
+https://github.com/samuel/go-zookeeper/archive/d0e0d8e11f318e000a8cc434616d69e329edc374.tar.gz -> go-zookeeper-d0e0d8e11f318e000a8cc434616d69e329edc374.tar.gz"
+STRIP_MASK="*.a"
+S="${WORKDIR}/src/${GO_PN}"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${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}
+}
+
+src_prepare() {
+ sed -e 's|build: deps|build:|' -e 's|test: deps|test:|' \
+ -i Makefile || die
+
+ # Disable tests that fail under network-sandbox
+ sed -e 's:TestRun_onceFlag(:_\0:' -i cli_test.go || die
+ sed -e 's:TestRunner_quiescence(:_\0:' -i runner_test.go || die
+}
+
+src_compile() {
+ emake build
+}
+
+src_install() {
+ local x
+
+ dobin bin/${PN}
+ dodoc README.md
+
+ keepdir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ keepdir /etc/${PN}.d
+ insinto /etc/${PN}.d
+ doins "${FILESDIR}/"*.json.example
+}
diff --git a/app-admin/consul-template/consul-template-0.9.0.ebuild b/app-admin/consul-template/consul-template-0.9.0.ebuild
new file mode 100644
index 000000000000..0abadf7d7d2b
--- /dev/null
+++ b/app-admin/consul-template/consul-template-0.9.0.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit systemd user
+
+KEYWORDS="~amd64"
+DESCRIPTION="Generic template rendering and notifications with Consul"
+GO_PN="github.com/hashicorp/${PN}"
+HOMEPAGE="http://${GO_PN}"
+LICENSE="MPL-2.0"
+SLOT="0"
+IUSE="test"
+
+DEPEND=">=dev-lang/go-1.4
+ test? ( dev-go/go-tools )
+ app-admin/consul
+ app-admin/vault"
+RDEPEND=""
+
+SRC_URI="https://${GO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+https://github.com/hashicorp/go-multierror/archive/fcdddc395df1ddf4247c69bd436e84cfa0733f7e.tar.gz -> go-multierror-fcdddc395df1ddf4247c69bd436e84cfa0733f7e.tar.gz
+https://github.com/armon/go-radix/archive/0bab926c3433cfd6490c6d3c504a7b471362390c.tar.gz -> go-radix-0bab926c3433cfd6490c6d3c504a7b471362390c.tar.gz
+https://github.com/hashicorp/errwrap/archive/7554cd9344cec97297fa6649b055a8c98c2a1e55.tar.gz -> errwrap-7554cd9344cec97297fa6649b055a8c98c2a1e55.tar.gz
+https://github.com/armon/go-metrics/archive/a54701ebec11868993bc198c3f315353e9de2ed6.tar.gz -> go-metrics-a54701ebec11868993bc198c3f315353e9de2ed6.tar.gz
+https://github.com/hashicorp/go-msgpack/archive/71c2886f5a673a35f909803f38ece5810165097b.tar.gz -> go-msgpack-71c2886f5a673a35f909803f38ece5810165097b.tar.gz
+https://github.com/hashicorp/go-syslog/archive/42a2b573b664dbf281bd48c3cc12c086b17a39ba.tar.gz -> go-syslog-42a2b573b664dbf281bd48c3cc12c086b17a39ba.tar.gz
+https://github.com/hashicorp/golang-lru/archive/995efda3e073b6946b175ed93901d729ad47466a.tar.gz -> golang-lru-995efda3e073b6946b175ed93901d729ad47466a.tar.gz
+https://github.com/hashicorp/hcl/archive/513e04c400ee2e81e97f5e011c08fb42c6f69b84.tar.gz -> hcl-513e04c400ee2e81e97f5e011c08fb42c6f69b84.tar.gz
+https://github.com/hashicorp/logutils/archive/367a65d59043b4f846d179341d138f01f988c186.tar.gz -> logutils-367a65d59043b4f846d179341d138f01f988c186.tar.gz
+https://github.com/mitchellh/copystructure/archive/6fc66267e9da7d155a9d3bd489e00dad02666dc6.tar.gz -> copystructure-6fc66267e9da7d155a9d3bd489e00dad02666dc6.tar.gz
+https://github.com/mitchellh/mapstructure/archive/442e588f213303bec7936deba67901f8fc8f18b1.tar.gz -> mapstructure-442e588f213303bec7936deba67901f8fc8f18b1.tar.gz
+https://github.com/mitchellh/reflectwalk/archive/242be0c275dedfba00a616563e6db75ab8f279ec.tar.gz -> reflectwalk-242be0c275dedfba00a616563e6db75ab8f279ec.tar.gz
+https://github.com/samuel/go-zookeeper/archive/d0e0d8e11f318e000a8cc434616d69e329edc374.tar.gz -> go-zookeeper-d0e0d8e11f318e000a8cc434616d69e329edc374.tar.gz"
+STRIP_MASK="*.a"
+S="${WORKDIR}/src/${GO_PN}"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${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}
+}
+
+src_prepare() {
+ sed -e 's|build: deps|build:|' -e 's|test: deps|test:|' \
+ -i Makefile || die
+
+ # Disable tests that fail under network-sandbox
+ sed -e 's:TestRun_onceFlag(:_\0:' -i cli_test.go || die
+ sed -e 's:TestRunner_quiescence(:_\0:' -i runner_test.go || die
+}
+
+src_compile() {
+ emake build
+}
+
+src_install() {
+ local x
+
+ dobin bin/${PN}
+ dodoc README.md
+
+ keepdir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ keepdir /etc/${PN}.d
+ insinto /etc/${PN}.d
+ doins "${FILESDIR}/"*.json.example
+}
diff --git a/app-admin/consul-template/consul-template-9999.ebuild b/app-admin/consul-template/consul-template-9999.ebuild
new file mode 100644
index 000000000000..40307ab73520
--- /dev/null
+++ b/app-admin/consul-template/consul-template-9999.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit git-r3 systemd user
+
+KEYWORDS=""
+DESCRIPTION="Generic template rendering and notifications with Consul"
+GO_PN="github.com/hashicorp/${PN}"
+HOMEPAGE="http://${GO_PN}"
+EGIT_REPO_URI="git://${GO_PN}.git"
+LICENSE="MPL-2.0"
+SLOT="0"
+IUSE="test"
+
+DEPEND=">=dev-lang/go-1.4:=
+ test? ( dev-go/go-tools )
+ app-admin/consul
+ app-admin/vault"
+RDEPEND=""
+
+SRC_URI=""
+STRIP_MASK="*.a"
+S="${WORKDIR}/src/${GO_PN}"
+EGIT_CHECKOUT_DIR="${S}"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_unpack() {
+ export GOPATH=${WORKDIR}
+ git-r3_src_unpack
+ go get -d -v ./... $(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...) || die
+}
+
+src_prepare() {
+ sed -e 's|build: deps|build:|' -e 's|test: deps|test:|' \
+ -i Makefile || die
+
+ # Disable tests that fail under network-sandbox
+ sed -e 's:TestRun_onceFlag(:_\0:' -i cli_test.go || die
+ sed -e 's:TestRunner_quiescence(:_\0:' -i runner_test.go || die
+}
+
+src_compile() {
+ emake build
+}
+
+src_install() {
+ local x
+
+ dobin bin/${PN}
+ dodoc README.md
+
+ keepdir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ keepdir /etc/${PN}.d
+ insinto /etc/${PN}.d
+ doins "${FILESDIR}/"*.json.example
+}
diff --git a/app-admin/consul-template/files/consul-template.confd b/app-admin/consul-template/files/consul-template.confd
new file mode 100644
index 000000000000..9af7d023305e
--- /dev/null
+++ b/app-admin/consul-template/files/consul-template.confd
@@ -0,0 +1,7 @@
+# you can change the init script behavior by setting those parameters
+# - group (default: consul-template)
+# - pidfile (default: /run/consul-template/consul-template.pid)
+# - user (default: consul-template)
+
+# extra arguments for the consul agent
+command_args="-config=/etc/consul-template.d"
diff --git a/app-admin/consul-template/files/consul-template.initd b/app-admin/consul-template/files/consul-template.initd
new file mode 100644
index 000000000000..7add14f3a573
--- /dev/null
+++ b/app-admin/consul-template/files/consul-template.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="consul-template agent"
+group=${group:-${SVCNAME}}
+pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
+user=${user:-${SVCNAME}}
+
+command="/usr/bin/${SVCNAME}"
+command_args="agent -config-dir=/etc/consul-template.d ${command_args}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+ --stdout /var/log/${SVCNAME}/${SVCNAME}.log \
+ --stderr /var/log/${SVCNAME}/${SVCNAME}.log"
+
+depend() {
+ need net
+ after net
+}
+
+start_pre() {
+ checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
+}
diff --git a/app-admin/consul-template/files/consul-template.service b/app-admin/consul-template/files/consul-template.service
new file mode 100644
index 000000000000..be4ac71c7288
--- /dev/null
+++ b/app-admin/consul-template/files/consul-template.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=consul-template daemon
+Requires=network-online.target
+After=network-online.target
+
+[Service]
+User=consul-template
+Environment=CONSUL_TEMPLATE_DAEMON_OPTS="-config=/etc/consul-template.d"
+ExecStart=/usr/bin/consul-template $CONSUL_TEMPLATE_DAEMON_OPTS
+Restart=on-failure
+SuccessExitStatus=12
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=default.target
diff --git a/app-admin/consul-template/files/localhost.json.example b/app-admin/consul-template/files/localhost.json.example
new file mode 100644
index 000000000000..64dec09cfc90
--- /dev/null
+++ b/app-admin/consul-template/files/localhost.json.example
@@ -0,0 +1 @@
+consul = "127.0.0.1:8500"
diff --git a/app-admin/consul-template/metadata.xml b/app-admin/consul-template/metadata.xml
new file mode 100644
index 000000000000..a12ecb248fbf
--- /dev/null
+++ b/app-admin/consul-template/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-template</remote-id>
+ </upstream>
+</pkgmetadata>