2023-11-26 11:06:23 -05:00
|
|
|
PORTNAME= headscale
|
2024-06-09 16:34:11 -04:00
|
|
|
PORTVERSION= 0.22.3
|
2023-11-26 11:06:23 -05:00
|
|
|
DISTVERSIONPREFIX= v
|
|
|
|
CATEGORIES= security net-vpn
|
|
|
|
|
|
|
|
MAINTAINER= m.muenz@gmail.com
|
|
|
|
COMMENT= Mesh VPN that makes it easy to connect your devices
|
|
|
|
WWW= https://github.com/juanfont/headscale
|
|
|
|
|
|
|
|
LICENSE= BSD3CLAUSE
|
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
|
|
|
|
RUN_DEPENDS= ca_root_nss>0:security/ca_root_nss
|
|
|
|
|
|
|
|
USES= go:modules
|
|
|
|
USE_RC_SUBR= headscale
|
|
|
|
|
|
|
|
GO_MODULE= github.com/juanfont/headscale
|
|
|
|
|
|
|
|
GO_TARGET= ./cmd/headscale
|
|
|
|
|
|
|
|
PLIST_FILES= "@sample ${ETCDIR}/config.yaml.sample" \
|
|
|
|
"@dir /var/cache/${PORTNAME}" \
|
|
|
|
"@dir /var/db/${PORTNAME}" \
|
2024-06-09 16:34:11 -04:00
|
|
|
"@dir /var/lib/${PORTNAME}" \
|
|
|
|
"@dir /var/run/${PORTNAME}" \
|
2023-11-26 11:06:23 -05:00
|
|
|
bin/${PORTNAME}
|
|
|
|
|
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's|/etc/headscale|${PREFIX}/etc/${PORTNAME}|g' \
|
2024-06-09 16:34:11 -04:00
|
|
|
${WRKSRC}/hscontrol/config.go ${WRKSRC}/cmd/headscale/cli/root.go
|
2023-11-26 11:06:23 -05:00
|
|
|
@${REINPLACE_CMD} -e 's|/var/lib/headscale/db.sqlite|/var/db/${PORTNAME}/db.sqlite|g' \
|
|
|
|
${WRKSRC}/config-example.yaml
|
|
|
|
@${REINPLACE_CMD} -e 's|/var/lib/headscale/cache|/var/cache/${PORTNAME}|g' \
|
|
|
|
${WRKSRC}/config-example.yaml
|
|
|
|
@${REINPLACE_CMD} -e 's|/var/lib/headscale/private.key|${PREFIX}/etc/${PORTNAME}/private.key|g' \
|
|
|
|
${WRKSRC}/config-example.yaml
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/config-example.yaml ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/config.yaml.sample
|
|
|
|
${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}
|
|
|
|
${MKDIR} ${STAGEDIR}/var/cache/${PORTNAME}
|
2024-06-09 16:34:11 -04:00
|
|
|
${MKDIR} ${STAGEDIR}/var/lib/${PORTNAME}
|
|
|
|
${MKDIR} ${STAGEDIR}/var/run/${PORTNAME}
|
2023-11-26 11:06:23 -05:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|