summaryrefslogtreecommitdiff
path: root/net-vpn/tailscale/tailscale-1.78.3.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-19 06:30:51 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-19 06:30:51 +0000
commitf8bb2d659372d0add11c589dcb006d0b7f8822ae (patch)
tree5d64f4f593db363260360200660abcd8ff00d1c6 /net-vpn/tailscale/tailscale-1.78.3.ebuild
parentf57e008aa126ccdca95f7424e4d24a1a83a49682 (diff)
gentoo auto-resync : 19:12:2024 - 06:30:51HEADmaster
Diffstat (limited to 'net-vpn/tailscale/tailscale-1.78.3.ebuild')
-rw-r--r--net-vpn/tailscale/tailscale-1.78.3.ebuild63
1 files changed, 63 insertions, 0 deletions
diff --git a/net-vpn/tailscale/tailscale-1.78.3.ebuild b/net-vpn/tailscale/tailscale-1.78.3.ebuild
new file mode 100644
index 000000000000..d4a71a28913d
--- /dev/null
+++ b/net-vpn/tailscale/tailscale-1.78.3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 2020-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module linux-info systemd tmpfiles
+
+# These settings are obtained by running ./build_dist.sh shellvars` in
+# the upstream repo.
+# They should be updated on every bump.
+VERSION_MINOR="78"
+VERSION_SHORT="1.78.3"
+VERSION_LONG="1.78.3-t1b41fdedd"
+VERSION_GIT_HASH="1b41fdeddb6598b35ba15cc6b07740e0cc0e8411"
+
+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 ~ppc64 ~riscv ~x86"
+
+CONFIG_CHECK="~TUN"
+
+RDEPEND="net-firewall/iptables"
+BDEPEND=">=dev-lang/go-1.22"
+
+RESTRICT="test"
+
+# 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.longStamp=${VERSION_LONG}
+ -X tailscale.com/version.shortStamp=${VERSION_SHORT}
+ -X tailscale.com/version.gitCommitStamp=${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
+}