From 37ec2d4830ef0b12f13d07756d9edbbf3ec14c52 Mon Sep 17 00:00:00 2001 From: chungthuang Date: Tue, 9 Jan 2024 17:47:26 +0000 Subject: [PATCH] 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 --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 232a3493..cebc1e22 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ endif IMPORT_PATH := github.com/cloudflare/cloudflared PACKAGE_DIR := $(CURDIR)/packaging -PREFIX := /usr +PREFIX := /usr/local INSTALL_BINDIR := $(PREFIX)/bin/ INSTALL_MANDIR := $(PREFIX)/share/man/man1/ @@ -164,10 +164,19 @@ cover: test-ssh-server: 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 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) install -m755 cloudflared $(DESTDIR)$(INSTALL_BINDIR)/cloudflared install -m644 cloudflared.1 $(DESTDIR)$(INSTALL_MANDIR)/cloudflared.1