diff options
author | Manuel Rüger <mrueg@gentoo.org> | 2017-06-08 14:50:13 +0200 |
---|---|---|
committer | Manuel Rüger <mrueg@gentoo.org> | 2017-06-08 14:50:44 +0200 |
commit | 1a1337abdd64e6318c1382bafb6923c16073969a (patch) | |
tree | 4b0e555ee40a139976462f119b5766527bcb0cdd /sys-cluster/zetcd | |
parent | sci-electronics/linsmith: amd64 stable wrt bug #620998 (diff) | |
download | gentoo-1a1337abdd64e6318c1382bafb6923c16073969a.tar.gz gentoo-1a1337abdd64e6318c1382bafb6923c16073969a.tar.bz2 gentoo-1a1337abdd64e6318c1382bafb6923c16073969a.zip |
sys-cluster/zetcd: Initial version
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'sys-cluster/zetcd')
-rw-r--r-- | sys-cluster/zetcd/Manifest | 2 | ||||
-rw-r--r-- | sys-cluster/zetcd/files/zetcd.confd | 2 | ||||
-rw-r--r-- | sys-cluster/zetcd/files/zetcd.initd | 19 | ||||
-rw-r--r-- | sys-cluster/zetcd/metadata.xml | 13 | ||||
-rw-r--r-- | sys-cluster/zetcd/zetcd-0.0.2.ebuild | 43 |
5 files changed, 79 insertions, 0 deletions
diff --git a/sys-cluster/zetcd/Manifest b/sys-cluster/zetcd/Manifest new file mode 100644 index 000000000000..406a4f5dbd74 --- /dev/null +++ b/sys-cluster/zetcd/Manifest @@ -0,0 +1,2 @@ +DIST github.com-coreos-etcd-fa4903c83c72f2857b8ed795a3c86f140b89d52c.tar.gz 2875420 SHA256 594dafaa35ca0eea2eb6a0892dfaf97f9d0ff8f20fc4973484f5d677b793934f SHA512 f6455b1dec3813dc9d3d613f26ca329cda962f9c669956941419fd9da852466b751322888b55c07655d73766e476dfbea9a2e767155619eb9e97ba847d553280 WHIRLPOOL 293ac623950ff0b8a90c276cacc266a40f7ed767c5e77b8e70e8f325ad8f13dcd4f896395944f223ce3c4081eaa021f6c253964733278a74e8a98327707ee6e6 +DIST zetcd-0.0.2.tar.gz 1775595 SHA256 2f49859e4dd6efe14e28f3190a1882084e79d5a9e998fb12b17ff384ac0b887c SHA512 6cbc81dd260a23f0ca2356e9deb5ccc3d17d8b0d63b5162d1576c4bdc61917450872bc2c14e1a4a1ec88119cea3f140996207987fb4d7bf16516fadd366c40d4 WHIRLPOOL db0b6b58799642e8f960a4283bd49037a04934c5ee3244c323dec89931620b524c67571be94f34692f2c07c27bcd17d5e474388fc5e7d0b8f74f1467c6ef8e8d diff --git a/sys-cluster/zetcd/files/zetcd.confd b/sys-cluster/zetcd/files/zetcd.confd new file mode 100644 index 000000000000..c16dd309d00a --- /dev/null +++ b/sys-cluster/zetcd/files/zetcd.confd @@ -0,0 +1,2 @@ +# arguments for zetcd +command_args="--zkaddr 0.0.0.0:2181 --endpoints localhost:2379" diff --git a/sys-cluster/zetcd/files/zetcd.initd b/sys-cluster/zetcd/files/zetcd.initd new file mode 100644 index 000000000000..93b3a48b43ad --- /dev/null +++ b/sys-cluster/zetcd/files/zetcd.initd @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Zetcd Zookeeper frontend for etcd" +pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"} +user=${user:-${SVCNAME}} +group=${group:-${SVCNAME}} + +command="/usr/bin/zetcd" +command_args="${command_args}" +command_background="true" +start_stop_daemon_args="--user ${user} --group ${group} \ + --stdout /var/log/${SVCNAME}/${SVCNAME}.log \ + --stderr /var/log/${SVCNAME}/${SVCNAME}.log" + +start_pre() { + checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}" +} diff --git a/sys-cluster/zetcd/metadata.xml b/sys-cluster/zetcd/metadata.xml new file mode 100644 index 000000000000..1e42111f97b7 --- /dev/null +++ b/sys-cluster/zetcd/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <longdescription> + </longdescription> + <maintainer type="person"> + <email>mrueg@gentoo.org</email> + <name>Manuel Rüger</name> + </maintainer> + <upstream> + <remote-id type="github">coreos/zetcd</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-cluster/zetcd/zetcd-0.0.2.ebuild b/sys-cluster/zetcd/zetcd-0.0.2.ebuild new file mode 100644 index 000000000000..58c794d731ab --- /dev/null +++ b/sys-cluster/zetcd/zetcd-0.0.2.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGO_PN="github.com/coreos/zetcd" + +EGO_VENDOR=( "github.com/coreos/etcd fa4903c83c72f2857b8ed795a3c86f140b89d52c" ) + +inherit golang-build golang-vcs-snapshot user + +ARCHIVE_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64" + +DESCRIPTION="A ZooKeeper personality for etcd" +HOMEPAGE="https://github.com/coreos/zetcd" +SRC_URI="${ARCHIVE_URI} + ${EGO_VENDOR_URI}" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" + +RESTRICT="test" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_compile() { + pushd src || die + GOPATH="${WORKDIR}/${P}" go install ${EGO_PN}/cmd/... || die + popd || die +} + +src_install() { + dobin bin/* + dodoc src/${EGO_PN}/README.md + keepdir /var/log/zetcd + fowners -R ${PN}:${PN} /var/log/${PN} + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} |