diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-08-15 14:28:19 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-08-15 14:28:19 +0100 |
commit | 1c3adf43f1b866276828623dd63f9e10d29421d3 (patch) | |
tree | 08af6cfc34a399a31fab99fe6691383651b7891c /net-vpn/headscale/headscale-0.16.2.ebuild | |
parent | 49d7633bbfe37c8e50c9cd1815c4210ca0a38d49 (diff) |
gentoo auto-resync : 15:08:2022 - 14:28:19
Diffstat (limited to 'net-vpn/headscale/headscale-0.16.2.ebuild')
-rw-r--r-- | net-vpn/headscale/headscale-0.16.2.ebuild | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/net-vpn/headscale/headscale-0.16.2.ebuild b/net-vpn/headscale/headscale-0.16.2.ebuild new file mode 100644 index 000000000000..690595a38384 --- /dev/null +++ b/net-vpn/headscale/headscale-0.16.2.ebuild @@ -0,0 +1,49 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module systemd + +DESCRIPTION="An open source, self-hosted implementation of the Tailscale control server" +HOMEPAGE="https://github.com/juanfont/headscale" +DEPS_URIS=( https://dev.gentoo.org/~{dlan,jsmolic}/distfiles/net-vpn/headscale/${P}-deps.tar.xz ) +SRC_URI="https://github.com/juanfont/headscale/archive/v${PV}.tar.gz -> ${P}.tar.gz + ${DEPS_URIS[@]}" + +LICENSE="BSD Apache-2.0 MIT" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + acct-group/headscale + acct-user/headscale +" +RDEPEND=" + ${DEPEND} + net-firewall/iptables +" + +PATCHES=( + "${FILESDIR}"/config-socket.patch +) + +src_compile() { + emake version=v${PV} +} + +src_install() { + dobin headscale + dodoc -r docs/* config-example.yaml + keepdir /etc/headscale /var/lib/headscale + systemd_dounit "${FILESDIR}"/headscale.service + newconfd "${FILESDIR}"/headscale.confd headscale + newinitd "${FILESDIR}"/headscale.initd headscale + fowners -R ${PN}:${PN} /etc/headscale /var/lib/headscale +} + +pkg_postinst() { + [[ -f "${EROOT}"/etc/headscale/config.yaml ]] && return + elog "Please create ${EROOT}/etc/headscale/config.yaml before starting the service" + elog "An example is in ${EROOT}/usr/share/doc/${PV}/config-example.yaml" +} |