mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-05 12:22:57 +02:00
wtplan: fix build with modern go
This commit is contained in:
parent
a0e0b6de6c
commit
192aa2cdd1
1 changed files with 12 additions and 4 deletions
|
@ -15,13 +15,21 @@ checksum=31c66181f815889828eb2bd3739d6b23582ec75a5a8d6c6bf76c2a6679112bb4
|
||||||
do_build() {
|
do_build() {
|
||||||
export GOPATH=$(pwd)
|
export GOPATH=$(pwd)
|
||||||
export VERSIONSTR=$version
|
export VERSIONSTR=$version
|
||||||
go generate wtplan
|
go generate ./src/wtplan/main.go
|
||||||
go generate wtplan-web
|
go generate ./src/wtplan-web/main.go
|
||||||
|
cat <<-EOF >src/wtplan/version.go
|
||||||
|
package main
|
||||||
|
|
||||||
|
var version = \`wtplan ${version}\`
|
||||||
|
EOF
|
||||||
. $XBPS_COMMONDIR/environment/build-style/go.sh
|
. $XBPS_COMMONDIR/environment/build-style/go.sh
|
||||||
GOPATH=$(pwd)
|
GOPATH=$(pwd)
|
||||||
# Without -buildmode=pie, build failure on armv6hf-musl
|
# Without -buildmode=pie, build failure on armv6hf-musl
|
||||||
go build -buildmode=pie wtplan
|
go build -buildmode=pie -o wtplan \
|
||||||
go build -buildmode=pie wtplan-web
|
./src/wtplan/main.go ./src/wtplan/version.go
|
||||||
|
go build -buildmode=pie -o wtplan-web \
|
||||||
|
-ldflags "-X main.version=$version" \
|
||||||
|
./src/wtplan-web/main.go ./src/wtplan-web/textfiles.go
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue