summaryrefslogtreecommitdiff
path: root/Makefile
blob: add79503ffe71aed1666092c327c9551b863f5ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
VERSION := 0.0.39
DEBARCHS := amd64 i386 armhf arm64
EXECUTEABLES := $(DEBARCHS:%=bin/acmetool.%)
GITHUB_BASEURL := "https://github.com/hlandau/acme/releases/download"

all: $(EXECUTEABLES)

bin/acmetool.%: acmetool-v$(VERSION)-linux_%.tar.gz
	@echo "extracting files... from $<"
	@tar -xzf $< --strip-components=1
	@mv bin/acmetool $@

acmetool-v$(VERSION)-linux_%.tar.gz: URL = "$(GITHUB_BASEURL)/v$(VERSION)/$(shell echo $@ | sed s/i386/386/ | sed s/armhf/arm/)"
acmetool-v$(VERSION)-linux_%.tar.gz:
	@echo "fetching file: $(URL)"
	@wget -nc "$(URL)" -O $@ > /dev/null 2>&1

clean:
	rm -rf bin/
	rm -rf doc/
	rm -f README.md
	rm -f acmetool-*.tar.gz