master chld/ports-heresy / net / discordo / ndmake.sh
 1#!/bin/sh -ue
 2NAME=discordo
 3VERSION=git
 4RELEASE=1
 5SOURCE="https://github.com/ayn2op/discordo"
 6
 7prebuild(){
 8    mkdir -p $DESTDIR/$PREFIX/bin/
 9}
10
11build(){
12    export CGO_ENABLED=0
13    export GOFLAGS="-ldflags=-static-pie -ldflags=-s -ldflags=-w"
14    export GO_LDFLAGS="-buildmode=static-pie -s -w"
15    export CGO_CFLAGS="-O2 -pipe -static -static-pie -w -Wno-error"
16
17    go build -tags=nodbus
18    cp ./discordo $DESTDIR/$PREFIX/bin/discordo
19}
20
21. ${0%/*}/../../libsh/libdmake.sh