Files
danj 878840a488 Update to headscale-0.26.1
From Laurent Cheylus (maintainer)
2025-06-10 11:55:55 +00:00

50 lines
1.1 KiB
Makefile

ONLY_FOR_ARCHS = amd64 arm64
# modernc.org/libc has limited arch support, fails on i386
COMMENT = open source implementation of the Tailscale control server
MODGO_MODNAME = github.com/juanfont/headscale
MODGO_VERSION = v0.26.1
DISTNAME = headscale-${MODGO_VERSION}
CATEGORIES = net
HOMEPAGE = https://github.com/juanfont/headscale
MAINTAINER = Laurent Cheylus <foxy@free.fr>
# BSD-3
PERMIT_PACKAGE = Yes
WANTLIB += c pthread
MODULES = lang/go
MODGO_LDFLAGS += -X ${MODGO_MODNAME}/hscontrol/types.Version=$\
${MODGO_VERSION:S/v//}
# for patches to apply
WRKDIST = ${WRKSRC}
# Copy unmodified config-example.yaml for tests
post-extract:
cd ${WRKSRC} && cp config-example.yaml config-example-test.yaml
do-install:
${INSTALL_PROGRAM} ${MODGO_WORKSPACE}/bin/headscale ${PREFIX}/bin
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/headscale
${INSTALL_DATA} ${WRKSRC}/derp-example.yaml \
${PREFIX}/share/examples/headscale/
${SUBST_DATA} ${WRKSRC}/config-example.yaml \
${PREFIX}/share/examples/headscale/config-example.yaml
do-test:
cd ${WRKSRC} && ${MODGO_TEST_CMD} ./...
.include "modules.inc"
.include <bsd.port.mk>