summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-02-12 09:57:41 -0800
committerZac Medico <zmedico@gentoo.org>2020-02-12 10:01:04 -0800
commit5ecd273b83326b2163b5c3bf9d48dc9e26abc0b9 (patch)
tree7c22298e78ed0ae0a5f625e8212199165f4d630d /app-admin/consul
parentapp-admin/lastpass-binary-component: remove old (diff)
downloadgentoo-5ecd273b83326b2163b5c3bf9d48dc9e26abc0b9.tar.gz
gentoo-5ecd273b83326b2163b5c3bf9d48dc9e26abc0b9.tar.bz2
gentoo-5ecd273b83326b2163b5c3bf9d48dc9e26abc0b9.zip
app-admin/consul: Bump to version 1.7.0
Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'app-admin/consul')
-rw-r--r--app-admin/consul/Manifest1
-rw-r--r--app-admin/consul/consul-1.7.0.ebuild75
2 files changed, 76 insertions, 0 deletions
diff --git a/app-admin/consul/Manifest b/app-admin/consul/Manifest
index 426ed0b13b54..9ffce1f6e60f 100644
--- a/app-admin/consul/Manifest
+++ b/app-admin/consul/Manifest
@@ -1,2 +1,3 @@
DIST consul-1.6.2.tar.gz 22041280 BLAKE2B 0b2edcd68fa166c178587a1ed3ca0445847d34510cd4e341f85a370257958a155ef6f976b045fc8e87af39107a3930ccb6d7a798ad142e87362f82d68ece4c3c SHA512 2df67854b85fa27600bf2cd57c913669f784019ee5a25b20a950ab00a403ca0562d74cb73c3402ebcec6cd951d7b9b4eb80c926746bcc27050db85f31192f826
DIST consul-1.6.3.tar.gz 22065994 BLAKE2B 4d37a8141c097182c66a8ba7ab8f7031125e71b7a1b7dc8c419630504896634d797f4d733ddeb71555a2a988a2418548f40a12f333202833527483cbc8a590f6 SHA512 16a3fb3584d273ca178b213c9f314577d9473c39a5e436108bcae42f8b68803a548a5cc62d0c8426aa82e2b86dd6355f3d86f833ee6ec6fe1a4955589daf039f
+DIST consul-1.7.0.tar.gz 22791558 BLAKE2B 005c6c74d7808183b362286f98a2f5cc301c9aabb9afc4db1cd5f160ac0a0bdf9b868ad96b28bd3f1503e6fc2951720c69b5f9e4f888d0c4fb5f9fa534c322af SHA512 ea368335b34498ea92d80240d71424deceb903eab6fb7a22fca2bf6e7a509526c86899b501ac8045ad69b0fa102be6db0a11fa50917fc15ca17f889f948af4e6
diff --git a/app-admin/consul/consul-1.7.0.ebuild b/app-admin/consul/consul-1.7.0.ebuild
new file mode 100644
index 000000000000..b721d4f0ca37
--- /dev/null
+++ b/app-admin/consul/consul-1.7.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit golang-vcs-snapshot systemd user
+GIT_COMMIT="95fb95b"
+KEYWORDS="~amd64"
+EGO_PN="github.com/hashicorp/consul"
+DESCRIPTION="A tool for service discovery, monitoring and configuration"
+HOMEPAGE="https://www.consul.io"
+SRC_URI="https://github.com/hashicorp/consul/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="MPL-2.0 Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT"
+IUSE=""
+
+RESTRICT="test"
+
+DEPEND="dev-go/gox
+ >=dev-lang/go-1.11:=
+ >=dev-go/go-tools-0_pre20160121"
+RDEPEND=""
+
+pkg_setup() {
+ enewgroup consul
+ enewuser consul -1 -1 /var/lib/${PN} consul
+}
+
+src_prepare() {
+ default
+
+ # avoid network-sandbox violations since go-1.13
+ rm src/${EGO_PN}/go.mod || die
+ grep -rlZ '_ "github.com/envoyproxy/protoc-gen-validate/validate"' . | \
+ xargs -0 sed -i '/_ "github.com\/envoyproxy\/protoc-gen-validate\/validate"/d' || die
+
+ sed -e 's:go get -u -v $(GOTOOLS)::' \
+ -e 's:vendorfmt dev-build:dev-build:' \
+ -e '/^GIT.*?=/d' \
+ -i "src/${EGO_PN}/GNUmakefile" || die
+}
+
+src_compile() {
+ # The dev target sets causes build.sh to set appropriate XC_OS
+ # and XC_ARCH, and skips generation of an unused zip file,
+ # avoiding a dependency on app-arch/zip.
+ GOPATH="${S}" \
+ GOBIN="${S}/bin" \
+ GIT_DESCRIBE="v${PV}" \
+ GIT_DIRTY="" \
+ GIT_COMMIT="${GIT_COMMIT}" \
+ emake -C "src/${EGO_PN}" dev-build
+}
+
+src_install() {
+ local x
+
+ dobin bin/consul
+
+ keepdir /etc/consul.d
+ insinto /etc/consul.d
+ doins "${FILESDIR}/"*.json.example
+
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners consul:consul "${x}"
+ done
+
+ newinitd "${FILESDIR}/consul.initd" "${PN}"
+ newconfd "${FILESDIR}/consul.confd" "${PN}"
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+ systemd_dounit "${FILESDIR}/consul.service"
+}