github.com/dawnbass68/maddcash@v0.0.0-20201001105353-c91c12cb36e5/build/templates/backend/Makefile (about) 1 {{define "main" -}} 2 ARCHIVE := $(shell basename {{.Backend.BinaryURL}}) 3 4 all: 5 wget {{.Backend.BinaryURL}} 6 {{- if eq .Backend.VerificationType "gpg"}} 7 wget {{.Backend.VerificationSource}} -O checksum 8 gpg --verify checksum ${ARCHIVE} 9 {{- else if eq .Backend.VerificationType "gpg-sha256"}} 10 wget {{.Backend.VerificationSource}} -O checksum 11 gpg --verify checksum 12 sha256sum -c --ignore-missing checksum 13 {{- else if eq .Backend.VerificationType "sha256"}} 14 [ "$$(sha256sum ${ARCHIVE} | cut -d ' ' -f 1)" = "{{.Backend.VerificationSource}}" ] 15 {{- end}} 16 mkdir backend 17 {{.Backend.ExtractCommand}} ${ARCHIVE} 18 {{- if .Backend.ExcludeFiles}} 19 # generated from exclude_files 20 {{- range $index, $name := .Backend.ExcludeFiles}} 21 rm backend/{{$name}} 22 {{- end}} 23 {{- end}} 24 25 clean: 26 rm -rf backend 27 rm -f ${ARCHIVE} 28 rm -f checksum 29 {{end}}