summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2019-09-05 14:08:12 -0700
committerZac Medico <zmedico@gentoo.org>2019-09-05 14:08:12 -0700
commit74f68dc7ab149380d1291a47e94174cbdef377ee (patch)
treed703a6edfa45bce1ead3e8526f17ecbc3c52a45c /app-admin/consul
parentapp-admin/consul: Fix compile with go-1.13 (diff)
downloadgentoo-74f68dc7ab149380d1291a47e94174cbdef377ee.tar.gz
gentoo-74f68dc7ab149380d1291a47e94174cbdef377ee.tar.bz2
gentoo-74f68dc7ab149380d1291a47e94174cbdef377ee.zip
app-admin/consul: Bump to version 1.6.0
Package-Manager: Portage-2.3.75, Repoman-2.3.17 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.6.0.ebuild74
2 files changed, 75 insertions, 0 deletions
diff --git a/app-admin/consul/Manifest b/app-admin/consul/Manifest
index 25fe7d7c19c9..23d5661b5c02 100644
--- a/app-admin/consul/Manifest
+++ b/app-admin/consul/Manifest
@@ -3,3 +3,4 @@ DIST consul-1.5.0.tar.gz 20830405 BLAKE2B e64fbc22ade0c737db4f2f1b0e3966dbe61745
DIST consul-1.5.1.tar.gz 21123963 BLAKE2B 4fe6a45f442d849196a7b9961110cdcc6f92931626ab583859efabe62038f6b2c356b27b37ea41b27755cca138c567be5c81854794a1ba0ccae3f9e0dfd10749 SHA512 7486d24bf1fa9fe94175abf9e008dc4fe4277c509381a524a9ee20e17bc4959f621e39be29e33622cb672ef3a04f9161e575009197bcd35c78b45f1d2637a2ea
DIST consul-1.5.2.tar.gz 21697719 BLAKE2B 782d6fe02cda097db9256a7e508cf19cf4d514d7936022d339fa62db705f6c60468cea907cd22338bb61c3287bfccb3a4d435a4f9222aa7558999553909e5d40 SHA512 e0820592abc5e119f74c8bf3d11a23726ee6dda7d193864a4486d64deef0bfd6ae4c9170b57d6f978e7ddfeb425229a019c45a8edcdea0938bce9315f2444fd6
DIST consul-1.5.3.tar.gz 21743194 BLAKE2B c797b04457c5f0b12f06732a94038b25367b53a9e6088d725eea61786a0e18bd905ad680bc12c4bfa30b44292d2676689dd6f18e9e2143bf6e1b02c2c55f678f SHA512 3f275ec160b9e583b81ba8d463fdb05e9fc9058db2453d9393a56b67337ea04df98a89225323192230938e1abfb48fa60fe0a32b4d8980573b749217b69933e9
+DIST consul-1.6.0.tar.gz 22465984 BLAKE2B 3a030619786e8dabdf8b778012a80ff4b0e76ede6c313b688bf04bfd1a8488bff1bbd4a36c1dd11496bd1942f7bba2a9bb22ae3b364fee4335adfb741756dd67 SHA512 a122892693e3bee0fc0e0b5c0945e4a8dddb890228c091112e0db11a8afd33430611c20ff9bc13d2b3a2ac0d3b560be2d9c4e03a9cc425983fbd8f7edb699658
diff --git a/app-admin/consul/consul-1.6.0.ebuild b/app-admin/consul/consul-1.6.0.ebuild
new file mode 100644
index 000000000000..b5b9eab35a17
--- /dev/null
+++ b/app-admin/consul/consul-1.6.0.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit golang-vcs-snapshot systemd user
+GIT_COMMIT="944cc71"
+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"
+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:' \
+ -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"
+}