diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-08-10 09:32:05 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-08-10 09:32:05 +0100 |
commit | d087665a0d6764fc223d2f88a04db01d76af9cc0 (patch) | |
tree | 698510baa01e5c4c92f7867e40bed45acd5f4547 /net-vpn/headscale/headscale-0.22.3.ebuild | |
parent | d8e832445899a9a8ba4d8dc6f61f5feca79a3b85 (diff) |
gentoo auto-resync : 10:08:2023 - 09:32:05
Diffstat (limited to 'net-vpn/headscale/headscale-0.22.3.ebuild')
-rw-r--r-- | net-vpn/headscale/headscale-0.22.3.ebuild | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/net-vpn/headscale/headscale-0.22.3.ebuild b/net-vpn/headscale/headscale-0.22.3.ebuild new file mode 100644 index 000000000000..2379c7f4ee4e --- /dev/null +++ b/net-vpn/headscale/headscale-0.22.3.ebuild @@ -0,0 +1,48 @@ +# Copyright 2023 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://github.com/antonfischl1980/gentoo-go-deps/releases/download/${P}/${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 ~riscv" + +DEPEND=" + acct-group/headscale + acct-user/headscale +" +RDEPEND=" + ${DEPEND} + net-firewall/iptables +" + +src_compile() { + export -n GOCACHE XDG_CACHE_HOME + go build -o "./bin/${PN}" "./cmd/${PN}" || die +} + +src_install() { + dobin bin/headscale + dodoc -r config-example.yaml derp-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/${P}/config-example.yaml.bz2" + ewarn ">=headscale-0.19.0 has a DB structs breaking, please BACKUP your database before upgrading!" + ewarn "see also: https://github.com/juanfont/headscale/pull/1171 and https://github.com/juanfont/headscale/pull/1144" +} |