summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Lawes <graemelawes@gmail.com>2017-06-21 19:49:27 -0400
committerMichał Górny <mgorny@gentoo.org>2017-06-23 15:50:39 +0200
commit0724ec6307b264be0e4747a7d9d57eaed9df6767 (patch)
tree23510c454b956e9395e8fe409a529eed5eede134 /sys-cluster/teleport/teleport-2.2.1.ebuild
parentapp-misc/neofetch: update to 3.2.0 (diff)
downloadgentoo-0724ec6307b264be0e4747a7d9d57eaed9df6767.tar.gz
gentoo-0724ec6307b264be0e4747a7d9d57eaed9df6767.tar.bz2
gentoo-0724ec6307b264be0e4747a7d9d57eaed9df6767.zip
sys-cluster/teleport: add teleport v2.2.1
Closes: https://github.com/gentoo/gentoo/pull/4968
Diffstat (limited to 'sys-cluster/teleport/teleport-2.2.1.ebuild')
-rw-r--r--sys-cluster/teleport/teleport-2.2.1.ebuild51
1 files changed, 51 insertions, 0 deletions
diff --git a/sys-cluster/teleport/teleport-2.2.1.ebuild b/sys-cluster/teleport/teleport-2.2.1.ebuild
new file mode 100644
index 000000000000..50aac8796fe3
--- /dev/null
+++ b/sys-cluster/teleport/teleport-2.2.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils golang-build systemd user
+
+DESCRIPTION="Modern SSH server for teams managing distributed infrastructure"
+HOMEPAGE="https://gravitational.com/teleport"
+
+EGO_PN="github.com/gravitational/${PN}/..."
+
+if [ ${PV} == "9999" ] ; then
+ inherit git-r3 golang-vcs
+ EGIT_REPO_URI="https://github.com/gravitational/${PN}.git"
+else
+ inherit golang-vcs-snapshot
+ SRC_URI="https://github.com/gravitational/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+DEPEND="
+ app-arch/zip
+ >=dev-lang/go-1.8.3"
+RDEPEND=""
+
+src_compile() {
+ GOPATH="${S}" emake -C src/${EGO_PN%/*}
+ pushd src/${EGO_PN%/*}/web/dist >/dev/null || die
+ zip -qr "${S}/src/${EGO_PN%/*}/build/webassets.zip" . || die
+ popd >/dev/null || die
+ cat "${S}/src/${EGO_PN%/*}/build/webassets.zip" >> "src/${EGO_PN%/*}/build/${PN}" || die
+ zip -q -A "${S}/src/${EGO_PN%/*}/build/${PN}" || die
+}
+
+src_install() {
+ dodir /var/lib/${PN} /etc/${PN}
+ dobin src/${EGO_PN%/*}/build/{tsh,tctl,teleport}
+
+ insinto /etc/${PN}
+ doins "${FILESDIR}"/${PN}.yaml
+
+ newinitd "${FILESDIR}"/${PN}.init.d ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf.d ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_install_serviced "${FILESDIR}"/${PN}.service.conf ${PN}.service
+}