summaryrefslogtreecommitdiff
path: root/security/protonvpn-cli/Makefile
blob: e9b3b703a21f77fb0da8ecdf8e8b5c80f64575a1 (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

PORTNAME=	protonvpn-cli
DISTVERSIONPREFIX=	v
DISTVERSION=	1.1.2
PORTREVISION=	1
CATEGORIES=	security net net-vpn

MAINTAINER=	ports@FreeBSD.org
COMMENT=	ProtonVPN Command line tool

LICENSE=			MIT GPLv3
LICENSE_COMB=			multi
LICENSE_FILE_MIT=		${WRKSRC}/license.md
LICENSE_DISTFILES_MIT=		${DISTFILES:M*protonvpn-cli*}
LICENSE_DISTFILES_GPLv3=	${DISTFILES:M*scripts*}

RUN_DEPENDS=	bash:shells/bash \
		openvpn:security/openvpn \
		wget:ftp/wget \
		${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss

USES=		python

USE_GITHUB=	yes
GH_ACCOUNT=	ProtonVPN
GH_PROJECT=	scripts:updateResolvConf
GH_TAGNAME=	d5d0be1:updateResolvConf

NO_ARCH=	yes
NO_BUILD=	yes

PLIST_FILES=	bin/protonvpn-cli \
		bin/pvpn \
		etc/openvpn/update-resolv-conf

post-patch:
	${REINPLACE_CMD} s,\$$python,${PYTHON_CMD},g ${WRKSRC}/protonvpn-cli.sh
	${REINPLACE_CMD} s,wget,wget\ --ca-certificate\ ${LOCALBASE}/share/certs/ca-root-nss.crt,g ${WRKSRC}/protonvpn-cli.sh
	${REINPLACE_CMD} s,%%LOCALBASE%%,${LOCALBASE},g ${WRKSRC}/protonvpn-cli.sh

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/protonvpn-cli.sh ${STAGEDIR}${PREFIX}/bin/protonvpn-cli
	${LN} -s ./protonvpn-cli ${STAGEDIR}${PREFIX}/bin/pvpn
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/openvpn
	${INSTALL_SCRIPT} ${WRKSRC_updateResolvConf}/update-resolv-conf.sh ${STAGEDIR}${PREFIX}/etc/openvpn/update-resolv-conf

.include <bsd.port.mk>