From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AF58F139694 for ; Tue, 21 Feb 2017 21:05:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 29FC921C028; Tue, 21 Feb 2017 21:05:41 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ECFDD21C028 for ; Tue, 21 Feb 2017 21:05:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DD3A43413B7 for ; Tue, 21 Feb 2017 21:05:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CAECF4FEB for ; Tue, 21 Feb 2017 21:05:37 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1487711129.be297d59ac56817ce84371cce2dff5c24418a957.robbat2@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/consul/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-admin/consul/Manifest app-admin/consul/consul-0.7.5.ebuild X-VCS-Directories: app-admin/consul/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: be297d59ac56817ce84371cce2dff5c24418a957 X-VCS-Branch: master Date: Tue, 21 Feb 2017 21:05:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 59ba95b1-03fd-4692-a090-ef1f96450013 X-Archives-Hash: fd2191849293056f5c70eb533549dd28 commit: be297d59ac56817ce84371cce2dff5c24418a957 Author: Robin H. Johnson gentoo org> AuthorDate: Tue Feb 21 21:01:10 2017 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Tue Feb 21 21:05:29 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be297d59 app-admin/consul: bump. Package-Manager: portage-2.3.3 Signed-off-by: Robin H. Johnson gentoo.org> app-admin/consul/Manifest | 1 + app-admin/consul/consul-0.7.5.ebuild | 107 +++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) diff --git a/app-admin/consul/Manifest b/app-admin/consul/Manifest index 84777968e6..f2fe7307f4 100644 --- a/app-admin/consul/Manifest +++ b/app-admin/consul/Manifest @@ -1,5 +1,6 @@ DIST consul-0.7.1.tar.gz 4003354 SHA256 d1498c851df8aa150c7b4398fdbb74467af4949d20ce5b4840b88095fce71135 SHA512 0cc7dfb5b13c9aa5c59f3c74d44c863cb4099108dadc448233edd006bfd1c1ad422c18224d58113bdad1ca6160a89d1a0a04bf1f5e5f645d5499c0c4422d12ba WHIRLPOOL 33ebd4521a3caa0fb84a4d698e05b7f32c59848b90bbab0899661c51dc34c96fbac37f4eb9cb141be079c4419f57ac0da942d764737baf36dafd73230c84feac DIST consul-0.7.2.tar.gz 4200076 SHA256 28441273a928d0976a668ca0657ec655b10fffe45be19b879f3731812ec9e1c5 SHA512 62638f652bad421fe6400338f52f6a142dda9bf4838682f5a31c94ebdb3569ed217cfc7ba8b53a38fae44aaaa8e93912a486d445ed7addb2ff58c7c608469322 WHIRLPOOL fff1869c7d20dc6aa50b765d81d07b610187331d53bd9ec1526fcd85bb00b5426ee8b879946534186694bd3da88a2dd10042632c9bb31249ba6eeb9a8ca20b62 DIST consul-0.7.3.tar.gz 5022341 SHA256 4055c74382e9fd33c34389ed2b0ed00ab48dca19c1ab1f4293ca3d8f842b1d3d SHA512 abb81183118fa3af0e3ef6c46b15441c8ce6b15dbd37e8516a36f2a2fe7eda8f98a11c40e14181392858ba92d86f4148849c15b6afef16439f1b2e250159a717 WHIRLPOOL 04a4fed4f699a25201e036fd086c9375cd8cb54adfb31e1137f45fa24a478bdc8e1e16798354df192e7badffca0ab7ef6af3394aa371d32a3924912cfdc8f33d +DIST consul-0.7.5.tar.gz 5157056 SHA256 e213ba0c55bcb0d752ab120c770048e5156159db5974dc94193731f2e67d7d1f SHA512 6825a92ca2d1e3bf1db561de803e890bfa3a4c08718477a819ea10f5d0d9d13bf23ba7bedf2123cfa32b8f87d63ede7ee85d57a20f8cef5effd4651d28ab8a36 WHIRLPOOL 56e139b39bf73df558369acdd99a0cec42e05b88333013c18f69cfc56837ec007985ec48a845d461df44eed57d0f13256948942860431b84ab4d5d01becca2d2 DIST gox-c9740af9c6574448fd48eb30a71f964014c7a837.tar.gz 15772 SHA256 826666828f1ec3e535268fa95d983362c6c773e9a87aa94613e7a47805d22e38 SHA512 d4b2d5d9666285584697bc0d6ddc2f1a1e3f23741650e831adb42baffbb5f72fc3d5ae8a8fb6719faf1df75d3da334941b0404387f0c213aabdb5c3d5634c55d WHIRLPOOL 89d52013bfb563a11a4042760470ac317398c3f8a61b9e7734c3ac2737d916126ad10a113948eb5a8362de3d77e598e42f4a0510760ae67465bde08658947f7a DIST iochan-87b45ffd0e9581375c491fef3d32130bb15c5bd7.tar.gz 1785 SHA256 71c117246bb1d4d78ad5c3bc5d301942bcebaae5b1e35da1ad7851ceac71a675 SHA512 2efc0e3cbca496240e3e24550fd0d2aab742eb9b227230ff1ed4ee47344b994642b028bd4644cd45cd697f5f5ef6a729aad65537b10c6555bd52d9ca4b9c717c WHIRLPOOL 15dfd50bfc992a7b6a1b5d672d5bf9bfcb71a357eae371eac773e7fe9ad4ec8d4d0578e0dc6b12bb14689d1497129616b0eb300bbcb483a6865ac315bced562a diff --git a/app-admin/consul/consul-0.7.5.ebuild b/app-admin/consul/consul-0.7.5.ebuild new file mode 100644 index 0000000000..202f3ff2eb --- /dev/null +++ b/app-admin/consul/consul-0.7.5.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit systemd user + +KEYWORDS="~amd64" +EGO_PN="github.com/hashicorp/consul" +DESCRIPTION="A tool for service discovery, monitoring and configuration" +HOMEPAGE="http://www.consul.io" +SRC_URI="https://github.com/hashicorp/consul/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/mitchellh/gox/archive/c9740af9c6574448fd48eb30a71f964014c7a837.tar.gz -> gox-c9740af9c6574448fd48eb30a71f964014c7a837.tar.gz + https://github.com/mitchellh/iochan/archive/87b45ffd0e9581375c491fef3d32130bb15c5bd7.tar.gz -> iochan-87b45ffd0e9581375c491fef3d32130bb15c5bd7.tar.gz +" + +SLOT="0" +LICENSE="MPL-2.0" +IUSE="" + +RESTRICT="test" + +DEPEND=" + >=dev-lang/go-1.7.5:= + >=dev-go/go-tools-0_pre20160121" +RDEPEND="" + +pkg_setup() { + enewgroup consul + enewuser consul -1 -1 /var/lib/${PN} consul +} + +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} + if [[ ${x} == *.tar.gz ]]; then + go_package=$(get_archive_go_package ${x}) + mkdir -p src/${go_package%/*} + mv ${go_package##*/}-* src/${go_package} || die + fi + done +} + +src_unpack() { + mkdir "${S}" || die + cd "${S}" || die + unpack_go_packages +} + +src_prepare() { + eapply_user + # Avoid the need to have a git checkout + sed -e 's:^GIT.*::' \ + -e 's:-X main.GitCommit.*:" \\:' \ + -i "${S}/src/${EGO_PN}/scripts/build.sh" || die + + # go install golang.org/x/tools/cmd/stringer: mkdir /usr/lib/go-gentoo/bin/: permission denied + sed -e 's:go get -u -v $(GOTOOLS)::' \ + -i "${S}/src/${EGO_PN}/GNUmakefile" || die +} + +src_compile() { + export GOPATH="${S}" + go install -v -work -x ${EGO_BUILD_FLAGS} "github.com/mitchellh/gox/..." || die + # 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. + PATH=${PATH}:${S}/bin \ + emake -C "${S}/src/${EGO_PN}" dev +} + +src_install() { + local x + + dobin "${S}/bin/${PN}" + + 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" +}