TUN-8134: Install cloudflare go as part of make install

To build cloudflared from source, one will need a go tool chain that
supports post quantum curves
This commit is contained in:
chungthuang 2024-01-09 17:47:26 +00:00
parent ecd101d485
commit 37ec2d4830
1 changed files with 11 additions and 2 deletions

View File

@ -46,7 +46,7 @@ endif
IMPORT_PATH := github.com/cloudflare/cloudflared IMPORT_PATH := github.com/cloudflare/cloudflared
PACKAGE_DIR := $(CURDIR)/packaging PACKAGE_DIR := $(CURDIR)/packaging
PREFIX := /usr PREFIX := /usr/local
INSTALL_BINDIR := $(PREFIX)/bin/ INSTALL_BINDIR := $(PREFIX)/bin/
INSTALL_MANDIR := $(PREFIX)/share/man/man1/ INSTALL_MANDIR := $(PREFIX)/share/man/man1/
@ -164,10 +164,19 @@ cover:
test-ssh-server: test-ssh-server:
docker-compose -f ssh_server_tests/docker-compose.yml up docker-compose -f ssh_server_tests/docker-compose.yml up
.PHONY: install-go
install-go:
./.teamcity/install-cloudflare-go.sh
export PATH="tmp/go/bin:${PATH}"
.PHONY: cleanup-go
cleanup-go:
rm -rf /tmp/go
cloudflared.1: cloudflared_man_template cloudflared.1: cloudflared_man_template
sed -e 's/\$${VERSION}/$(VERSION)/; s/\$${DATE}/$(DATE)/' cloudflared_man_template > cloudflared.1 sed -e 's/\$${VERSION}/$(VERSION)/; s/\$${DATE}/$(DATE)/' cloudflared_man_template > cloudflared.1
install: cloudflared cloudflared.1 install: install-go cloudflared cloudflared.1 cleanup-go
mkdir -p $(DESTDIR)$(INSTALL_BINDIR) $(DESTDIR)$(INSTALL_MANDIR) mkdir -p $(DESTDIR)$(INSTALL_BINDIR) $(DESTDIR)$(INSTALL_MANDIR)
install -m755 cloudflared $(DESTDIR)$(INSTALL_BINDIR)/cloudflared install -m755 cloudflared $(DESTDIR)$(INSTALL_BINDIR)/cloudflared
install -m644 cloudflared.1 $(DESTDIR)$(INSTALL_MANDIR)/cloudflared.1 install -m644 cloudflared.1 $(DESTDIR)$(INSTALL_MANDIR)/cloudflared.1