summaryrefslogtreecommitdiff
path: root/security/xray-core/Makefile
blob: 2598df6073043aed537027a2351825f7c92ae76f (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
PORTNAME=	xray-core
DISTVERSIONPREFIX=	v
DISTVERSION=	1.8.8
PORTREVISION=	4
CATEGORIES=	security
MASTER_SITES=	https://github.com/v2fly/geoip/releases/download/202403070031/:geoip \
		https://github.com/v2fly/domain-list-community/releases/download/20240301033006/:geosite
DISTFILES=	geoip.dat:geoip \
		dlc.dat:geosite
EXTRACT_ONLY=	v${DISTVERSION}.zip \
		xtls-Xray-core-v${DISTVERSION}_GH0.tar.gz

MAINTAINER=	kirill@drlebedev.com
COMMENT=	Set of network penetration tools
WWW=		https://github.com/XTLS/Xray-core

LICENSE=	MPL20
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		go:modules,1.22

USE_RC_SUBR=	xray
SUB_FILES=	pkg-message

USERS=		v2ray
GROUPS=		v2ray

SUB_LIST=	GROUP="${GROUPS}" \
		USER="${USERS}"

GO_PKGNAME=	github.com/${GH_ACCOUNT}/${PORTNAME}
GO_MODULE=	github.com/${GH_ACCOUNT}/${PORTNAME}
GO_TARGET=	./main:xray

USE_GITHUB=	yes
GH_ACCOUNT=	xtls
GH_PROJECT=	Xray-core

post-install:
	${MKDIR} ${STAGEDIR}${ETCDIR}
	${MKDIR} ${STAGEDIR}${DATADIR}
	${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/geoip.dat ${STAGEDIR}${DATADIR}/geoip.dat
	${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/dlc.dat ${STAGEDIR}${DATADIR}/geosite.dat
	${INSTALL_DATA} ${FILESDIR}/*.json.sample ${STAGEDIR}${ETCDIR}/

.include <bsd.port.mk>