summaryrefslogtreecommitdiff
path: root/sachet/Makefile
blob: a51c7024ba66ecde9a3969f57883396179d49b51 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
VERSION := "invalid"
#GITHUB_BASEURL := "https://github.com/messagebird/sachet/releases/download"
GITHUB_BASEURL := "https://build.spreadspace.org/pub/sachet"

.PHONY: clean

all: amd64/sachet

%/sachet: sachet-$(VERSION).linux-%.tar.gz
	mkdir -p $(shell echo $@ | sed 's#/.*##')
	tar -C $(shell echo $@ | sed 's#/.*##') -xzf "$<" --strip-components=1

sachet-$(VERSION).linux-%.tar.gz:
	wget -nc --progress=dot:mega "$(GITHUB_BASEURL)/$(VERSION)/$(shell echo $@ | sed s/i386/386/)" -O "$@"
	sha256sum -c --ignore-missing sha256sums.txt

clean:
	rm -rf amd64
	rm -f sachet-$(VERSION).linux-*.tar.gz