aboutsummaryrefslogtreecommitdiff
path: root/www/code-server/Makefile
blob: baad0ab35b3a658dfaf1d48f5c07e75fa2fe46ec (plain) (blame)
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
60
61
62
63
64
65
66
67
68
69
70
71
PORTNAME=	code-server
DISTVERSION=	4.140.0
CATEGORIES=	www
MASTER_SITES=	https://github.com/joneum/FreeBSD-CodeServer/releases/download/code-server-${DISTVERSION}/:code_server \
		https://github.com/github/copilot-cli/releases/download/v${COPILOT_CLI_VERSION}/:copilot_cli \
		https://registry.npmjs.org/@github/copilot-sdk-linux-x64/-/:copilot_sdk
DISTFILES=	vscode-node-modules-${VSCODE_VERSION}${EXTRACT_SUFX}:code_server \
		vscode-reh-web-linux-x64-${DISTVERSION}${EXTRACT_SUFX}:code_server \
		github-copilot-${COPILOT_CLI_VERSION}-linux-x64.tgz:copilot_cli \
		copilot-sdk-linux-x64-${COPILOT_SDK_VERSION}.tgz:copilot_sdk
.if !defined(BOOTSTRAP_NODE_MODULES)
DISTFILES+=	code-server-node-modules-${DISTVERSION}${EXTRACT_SUFX}:code_server
.endif
EXTRACT_ONLY=	${DISTFILES:Ncopilot-sdk-linux-x64*:C/:[^:]+$//}

MAINTAINER=	joneum@FreeBSD.org
COMMENT=	Run VS Code on a remote server and access it through a browser
WWW=		https://github.com/coder/code-server

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

EXTRACT_DEPENDS=	jq:textproc/jq
BUILD_DEPENDS=	npm-node24>0:www/npm-node24 \
		bash:shells/bash \
		pkgconf:devel/pkgconf \
		rg:textproc/ripgrep \
		tgrep:textproc/tgrep
LIB_DEPENDS=	libinotify.so:devel/libinotify \
		libsecret-1.so:security/libsecret \
		libuv.so:devel/libuv \
		libxkbfile.so:x11/libxkbfile \
		libX11.so:x11/libX11
RUN_DEPENDS=	node:www/node24

# Only a linux-x64 (amd64) vscode-reh-web distfile is provided.
ONLY_FOR_ARCHS=	amd64
ONLY_FOR_ARCHS_REASON=	only the vscode-reh-web-linux-x64 distfile is provided

USES=		cpe nodejs:24 perl5 pkgconfig python:build ssl
CPE_VENDOR=	coder

USE_GITHUB=	yes
GH_ACCOUNT=	coder
GH_PROJECT=	code-server
GH_TAGNAME=	v${DISTVERSION}
GH_TUPLE=	microsoft:vscode:${VSCODE_VERSION}:vscode

USE_RC_SUBR=	code-server

SUB_FILES=	code-server-wrapper

OPTIONS_DEFINE=	DOCS
PORTDOCS=	README.md EXTENSIONS.md

NO_CCACHE=	yes

VSCODE_VERSION=		1.140.0
# Copilot CLI SDK, only needed so the VS Code extension build passes.
# GitHub Copilot is closed-source and not usable on FreeBSD.
COPILOT_CLI_VERSION=	1.0.73
COPILOT_SDK_VERSION=	1.0.15-preview.4

MAKE_ENV+=	NODE_OPTIONS=--max-old-space-size=6144 \
		ESBUILD_WORKER_THREADS=1

.include "${.CURDIR}/Makefile.vscode"
.include "${.CURDIR}/Makefile.build"
.include "${.CURDIR}/Makefile.install"

.include <bsd.port.mk>