blob: 0f06481f827961de41071252ac35d32f03e715b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
PORTNAME= wireguard-tools
PORTVERSION= 1.0.20210315
PORTREVISION= 3
CATEGORIES= net net-vpn
MASTER_SITES= https://git.zx2c4.com/wireguard-tools/snapshot/
MAINTAINER= decke@FreeBSD.org
COMMENT= Fast, modern and secure VPN Tunnel
LICENSE= GPLv2
LICENSE_FILE= ${WRKDIR}/${DISTNAME}/COPYING
FLAVORS= default lite
lite_PKGNAMESUFFIX= -lite
USES= gmake tar:xz
WRKSRC= ${WRKDIR}/${DISTNAME}/src
MAKE_ARGS+= DEBUG=no WITH_BASHCOMPLETION=yes WITH_SYSTEMDUNITS=no
MAKE_ENV+= MANDIR="${MANPREFIX}/man" \
SYSCONFDIR="${PREFIX}/etc"
OPTIONS_DEFINE= WGQUICK
OPTIONS_DEFAULT=WGQUICK
OPTIONS_SUB= yes
WGQUICK_DESC= wg-quick(8) userland utility
WGQUICK_RUN_DEPENDS= bash:shells/bash
WGQUICK_MAKE_ARGS= WITH_WGQUICK=yes
WGQUICK_MAKE_ARGS_OFF= WITH_WGQUICK=no
.if ${FLAVOR:U} == lite
USE_RC_SUBR= wireguard_lite
OPTIONS_EXCLUDE=WGQUICK
COMMENT+= (lite flavor)
.endif
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MWGQUICK}
USE_RC_SUBR= wireguard_wgquick
.endif
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
${WRKSRC}/completion/wg-quick.bash-completion \
${WRKSRC}/wg-quick/freebsd.bash
install-rc-script:
@${ECHO_MSG} "===> Staging rc.d startup script(s)"
@for i in ${USE_RC_SUBR}; do \
_prefix=${PREFIX}; \
[ "${PREFIX}" = "/usr" ] && _prefix="" ; \
${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${STAGEDIR}$${_prefix}/etc/rc.d/wireguard; \
${ECHO_CMD} "@(root,wheel,0755) $${_prefix}/etc/rc.d/wireguard" >> ${TMPPLIST}; \
done
.include <bsd.port.mk>
|