2019-03-23 23:56:39 +03:00
|
|
|
|
|
|
|
HOSTNAME_FQDN := codeberg.org
|
|
|
|
|
|
|
|
export BUILDDIR := /tmp/build
|
|
|
|
export GOROOT := ${BUILDDIR}/go
|
|
|
|
export GOPATH := ${BUILDDIR}/gitea
|
|
|
|
export PATH := ${GOROOT}/bin:${GOPATH}/bin:${PATH}
|
|
|
|
|
2021-02-02 03:41:25 +03:00
|
|
|
GOTAR = go1.15.6.$(shell uname | tr [:upper:] [:lower:])-amd64.tar.gz
|
2019-03-23 23:56:39 +03:00
|
|
|
ORIGIN = ssh://prlgc.com/git/gogs-gitea
|
|
|
|
|
|
|
|
TARGETS = ${GOPATH}/bin/avatar
|
|
|
|
|
|
|
|
all : ${TARGETS}
|
|
|
|
|
|
|
|
${GOPATH}/bin/avatar : main.go ${GOROOT}/bin/go
|
|
|
|
go build -o $@ $<
|
|
|
|
|
2021-02-02 03:41:25 +03:00
|
|
|
${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}
|
2019-03-23 23:56:39 +03:00
|
|
|
|
|
|
|
clean :
|
2021-02-02 03:41:25 +03:00
|
|
|
rm -rf ${TARGETS}
|
2019-03-23 23:56:39 +03:00
|
|
|
|
|
|
|
realclean :
|
|
|
|
rm -rf ${BUILDDIR}
|
|
|
|
|