1
0
Fork 0

Made a new target to generate templates only when they are missing. Also put go install jade in it. Hence, no need in check in the PKGBUILD.

This commit is contained in:
Alexander Andreev 2023-05-24 22:40:06 +04:00
parent 21d05e7488
commit 9c5bad04d4
Signed by: Arav
GPG Key ID: D22A817D95815393
2 changed files with 4 additions and 7 deletions

View File

@ -9,17 +9,18 @@ VERSION=23.21.0
LDFLAGS=-ldflags "-s -w -X main.version=${VERSION}" -tags osusergo,netgo
all: ${TARGET}
all: web/*.jade.go ${TARGET}
.PHONY: ${TARGET}
${TARGET}:
go generate web/web.go
go build -o bin/$@ ${LDFLAGS} cmd/$@/main.go
go build -o bin/$@-clean ${LDFLAGS} cmd/$@-clean/main.go
install-jade:
web/*.jade.go:
go install github.com/Joker/jade/cmd/jade@latest
go generate web/web.go
install:
install -Dm 0755 bin/${TARGET} ${DESTDIR}usr/bin/${TARGET}

View File

@ -17,10 +17,6 @@ build() {
export GOPATH="$srcdir"/gopath
if [ ! -f "$(go env GOPATH)/bin/jade" ]; then
make DESTDIR="$pkgdir/" install-jade
fi
make VERSION=$pkgver DESTDIR="$pkgdir/"
}