summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBao Trinh2023-04-12 08:33:44 -0500
committerBao Trinh2023-04-12 08:33:44 -0500
commitb1ccc0822278dfd8c407f45928edd0a87d6d263a (patch)
treec11ddaf06b3f6161d3e11b973a91de2055014437
parent8c45c4168374be7f937411593e9396ab172e5f34 (diff)
downloadaur-b1ccc0822278dfd8c407f45928edd0a87d6d263a.tar.gz
enable debug packages
-rw-r--r--PKGBUILD12
1 files changed, 8 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 01f0394519c1..bc3339439861 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -36,12 +36,16 @@ prepare() {
build() {
cd "${_pkgname}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export GOPATH="${srcdir}"
go build -v \
- -trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
- -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
+ -ldflags "-linkmode=external -compressdwarf=false -extldflags ${LDFLAGS}" \
-o build \
.
}
@@ -53,8 +57,8 @@ package() {
install -vDm755 -t "$pkgdir/usr/lib/nomad/plugins" "build/${_pkgname}"
# documentation
+ rm "examples/plugins/.gitkeep"
+ rmdir "examples/plugins"
install -vDm644 -t "$pkgdir/usr/share/doc/${_pkgname}" README.md
cp -vr examples "$pkgdir/usr/share/doc/${_pkgname}"
- # note: examples/plugins is an empty folder
- rm -rf "$pkgdir/usr/share/doc/${_pkgname}/examples/plugins"
}