avatars/Makefile
2021-02-02 01:41:25 +01:00

30 lines
669 B
Makefile
Executable File

HOSTNAME_FQDN := codeberg.org
export BUILDDIR := /tmp/build
export GOROOT := ${BUILDDIR}/go
export GOPATH := ${BUILDDIR}/gitea
export PATH := ${GOROOT}/bin:${GOPATH}/bin:${PATH}
GOTAR = go1.15.6.$(shell uname | tr [:upper:] [:lower:])-amd64.tar.gz
ORIGIN = ssh://prlgc.com/git/gogs-gitea
TARGETS = ${GOPATH}/bin/avatar
all : ${TARGETS}
${GOPATH}/bin/avatar : main.go ${GOROOT}/bin/go
go build -o $@ $<
${GOROOT}/bin/go :
mkdir -p ${GOROOT}/Downloads
wget -c --no-verbose --directory-prefix=${GOROOT}/Downloads https://dl.google.com/go/${GOTAR}
tar xfz ${GOROOT}/Downloads/${GOTAR} -C ${BUILDDIR}
clean :
rm -rf ${TARGETS}
realclean :
rm -rf ${BUILDDIR}