summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2016-01-22 20:54:39 +0100
committerJustin Lecher <jlec@gentoo.org>2016-01-22 22:03:03 +0100
commit8d7da01c2e82f43b504e73cb0e40e93ed9f09e45 (patch)
treeb0e5f7441d86d9dfd987dcf7ccf397656852d3fe /app-admin/consul/consul-9999.ebuild
parentdev-libs/mathjax: Use egit_clean to clean workdir (diff)
downloadgentoo-8d7da01c2e82f43b504e73cb0e40e93ed9f09e45.tar.gz
gentoo-8d7da01c2e82f43b504e73cb0e40e93ed9f09e45.tar.bz2
gentoo-8d7da01c2e82f43b504e73cb0e40e93ed9f09e45.zip
app-admin/consul: Use egit_clean to clean workdir
* Sort global scope according to skel.ebuild * Add missing die Package-Manager: portage-2.2.27 Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'app-admin/consul/consul-9999.ebuild')
-rw-r--r--app-admin/consul/consul-9999.ebuild26
1 files changed, 17 insertions, 9 deletions
diff --git a/app-admin/consul/consul-9999.ebuild b/app-admin/consul/consul-9999.ebuild
index 3c38c200dad4..bce86d8de781 100644
--- a/app-admin/consul/consul-9999.ebuild
+++ b/app-admin/consul/consul-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -6,17 +6,22 @@ EAPI=5
inherit git-r3 golang-base systemd user
-KEYWORDS=""
+GO_PN="github.com/hashicorp/consul"
+
DESCRIPTION="A tool for service discovery, monitoring and configuration"
HOMEPAGE="http://www.consul.io"
-GO_PN="github.com/hashicorp/consul"
+SRC_URI=""
EGIT_REPO_URI="git://${GO_PN}.git"
-LICENSE="MPL-2.0"
+
SLOT="0"
+LICENSE="MPL-2.0"
+KEYWORDS=""
IUSE="test web"
+
RESTRICT="test"
-DEPEND=">=dev-lang/go-1.4:=
+DEPEND="
+ >=dev-lang/go-1.4:=
dev-go/go-crypto:=
test? ( dev-go/go-tools )
web? (
@@ -24,10 +29,11 @@ DEPEND=">=dev-lang/go-1.4:=
dev-ruby/uglifier
)"
RDEPEND=""
-SRC_URI=""
STRIP_MASK="*.a"
+
S="${WORKDIR}/src/${GO_PN}"
+
EGIT_CHECKOUT_DIR="${S}"
pkg_setup() {
@@ -80,7 +86,7 @@ src_install() {
local x
dobin bin/*
- rm -rf bin
+ rm -rf bin || die
keepdir /etc/consul.d
insinto /etc/consul.d
@@ -100,8 +106,10 @@ src_install() {
newconfd "${FILESDIR}/consul.confd" "${PN}"
systemd_dounit "${FILESDIR}/consul.service"
- find "${WORKDIR}"/{pkg,src} -name '.git*' -exec rm -rf {} \; 2>/dev/null
- find "${WORKDIR}"/src/${GO_PN} -mindepth 1 -maxdepth 1 -type f -delete
+ egit_clean "${WORKDIR}"/{pkg,src}
+
+ find "${WORKDIR}"/src/${GO_PN} -mindepth 1 -maxdepth 1 -type f -delete || die
+
while read -r -d '' x; do
x=${x#${WORKDIR}/src}
[[ -d ${WORKDIR}/pkg/${KERNEL}_${ARCH}/${x} ||