Skip to content

Commit

Permalink
TUN-8134: Install cloudflare go as part of make install
Browse files Browse the repository at this point in the history
To build cloudflared from source, one will need a go tool chain that
supports post quantum curves
  • Loading branch information
chungthuang committed Jan 10, 2024
1 parent ecd101d commit 37ec2d4
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 37ec2d4

Please sign in to comment.