From e26a7b5ef1fe42a66a3c91fe878da93c7cf83737 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 18 Jul 2022 20:36:58 +0100 Subject: gentoo auto-resync : 18:07:2022 - 20:36:57 --- net-vpn/tailscale/tailscale-1.26.2.ebuild | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 net-vpn/tailscale/tailscale-1.26.2.ebuild (limited to 'net-vpn/tailscale/tailscale-1.26.2.ebuild') diff --git a/net-vpn/tailscale/tailscale-1.26.2.ebuild b/net-vpn/tailscale/tailscale-1.26.2.ebuild new file mode 100644 index 000000000000..e6aa1f578e04 --- /dev/null +++ b/net-vpn/tailscale/tailscale-1.26.2.ebuild @@ -0,0 +1,57 @@ +# Copyright 2020-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit go-module systemd tmpfiles + +# These settings are obtained by running ./build_dist.sh shellvars` in +# the upstream repo. +VERSION_MINOR="1.26" +VERSION_SHORT="1.26.2" +VERSION_LONG="1.26.2-t5a60f1ffe" +VERSION_GIT_HASH="5a60f1ffe3741c55eb9637ddd2f20157d164f511" + +DESCRIPTION="Tailscale vpn client" +HOMEPAGE="https://tailscale.com" +SRC_URI="https://github.com/tailscale/tailscale/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" + +RDEPEND="net-firewall/iptables" + +# This translates the build command from upstream's build_dist.sh to an +# ebuild equivalent. +build_dist() { + ego build -tags xversion -ldflags " + -X tailscale.com/version.Long=${VERSION_LONG} + -X tailscale.com/version.Short=${VERSION_SHORT} + -X tailscale.com/version.GitCommit=${VERSION_GIT_HASH}" "$@" +} + +src_compile() { + build_dist ./cmd/tailscale + build_dist ./cmd/tailscaled +} + +src_install() { + dosbin tailscaled + dobin tailscale + + systemd_dounit cmd/tailscaled/tailscaled.service + insinto /etc/default + newins cmd/tailscaled/tailscaled.defaults tailscaled + keepdir /var/lib/${PN} + fperms 0750 /var/lib/${PN} + + newtmpfiles "${FILESDIR}/${PN}.tmpfiles" ${PN}.conf + + newinitd "${FILESDIR}/${PN}d.initd" ${PN} + newconfd "${FILESDIR}/${PN}d.confd" ${PN} +} + +pkg_postinst() { + tmpfiles_process ${PN}.conf +} -- cgit v1.2.3