upgpkg: 0.9.0-2
Enable debug build.
This commit is contained in:
parent
7b62928270
commit
1e8c0c37e9
9
PKGBUILD
9
PKGBUILD
@ -4,7 +4,7 @@
|
||||
|
||||
pkgname=gotosocial
|
||||
pkgver=0.9.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc='ActivityPub social network server written in Golang'
|
||||
arch=('x86_64')
|
||||
url='https://gotosocial.org'
|
||||
@ -65,6 +65,7 @@ prepare() {
|
||||
mkdir build
|
||||
|
||||
# download dependencies
|
||||
export GOPATH="${srcdir}"
|
||||
go mod download
|
||||
|
||||
# use FHS directories
|
||||
@ -78,17 +79,19 @@ build() {
|
||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||
export GOPATH="${srcdir}"
|
||||
|
||||
# generate up-to-date swagger.yaml
|
||||
swagger generate spec --scan-models --exclude-deps -o web/assets/swagger.yaml
|
||||
sed -e "s/REPLACE_ME/$pkgver/" -i web/assets/swagger.yaml
|
||||
|
||||
go build -v \
|
||||
-trimpath \
|
||||
-buildmode=pie \
|
||||
-mod=readonly \
|
||||
-modcacherw \
|
||||
-ldflags "-linkmode external -extldflags ${LDFLAGS} \
|
||||
-ldflags "-compressdwarf=false \
|
||||
-linkmode external \
|
||||
-extldflags ${LDFLAGS} \
|
||||
-X main.Version=$pkgver" \
|
||||
-o build \
|
||||
./cmd/...
|
||||
|
Loading…
Reference in New Issue
Block a user