Skip to content

Commit

Permalink
app-admin/consul: add 1.15.2
Browse files Browse the repository at this point in the history
Signed-off-by: Zac Medico <[email protected]>
  • Loading branch information
zmedico committed Apr 17, 2023
1 parent ebed7bc commit dcd5f42
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-admin/consul/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST consul-1.14.3-vendor.tar.gz 40650363 BLAKE2B 1c15333d1a1053da871ccf032c8b21f6b1265a5c222395f217444de3c4472c755d205bad82d83ecdb520081830d11e4c7f113207fe83a7dac4860497518d5be8 SHA512 b1764b845bea8681d72858de4558fdfce4de1faaaf1fb5221eab12d8c9f512efbf1b8a118ea68c829660e23410381a2b71d12fc6d995a64be041d74ad616a663
DIST consul-1.15.2-vendor.tar.gz 43070821 BLAKE2B 39e375cf6fcb17e9a633aa7048588560f8efc93aacad7a332210d509d0b50a74e525be5e56ad9e0aa642b43f68362b8e28beb264c4365a96dd98eab6f4d296d7 SHA512 b00cd569dee83c7850fc13e5591c55dd2903242349ec747cc7ac8f18ebd207858148521c62a1da914610988f95cd543fcc5f5771a1c072c09521a8af0a474ba6
57 changes: 57 additions & 0 deletions app-admin/consul/consul-1.15.2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
inherit go-module systemd

DESCRIPTION="A tool for service discovery, monitoring and configuration"
HOMEPAGE="https://www.consul.io"
GIT_COMMIT="5e08e229dbdaed5adf3ca99afe9df247c51507da"

SRC_URI="https://github.com/zmedico/consul/archive/v${PV}-vendor.tar.gz -> ${P}-vendor.tar.gz"

LICENSE="MPL-2.0 Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT"
RESTRICT="test"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"

BDEPEND="dev-go/gox"
COMMON_DEPEND="
acct-group/consul
acct-user/consul"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}"

S=${WORKDIR}/${P}-vendor

src_prepare() {
default
sed -e 's|^GIT_DATE=.*|GIT_DATE=2023-03-30T17:51:19Z|' -i 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.
GIT_DESCRIBE="v${PV}" \
GIT_DIRTY="" \
GIT_COMMIT="${GIT_COMMIT}" \
emake dev-build
}

src_install() {
dobin bin/consul

keepdir /etc/consul.d
insinto /etc/consul.d
doins "${FILESDIR}/"*.json.example

keepdir /var/log/consul
fowners consul:consul /var/log/consul

newinitd "${FILESDIR}/consul.initd" "${PN}"
newconfd "${FILESDIR}/consul.confd" "${PN}"
insinto /etc/logrotate.d
newins "${FILESDIR}/${PN}.logrotated" "${PN}"
systemd_dounit "${FILESDIR}/consul.service"
}

0 comments on commit dcd5f42

Please sign in to comment.