Built Netbird for PPC64

This commit is contained in:
bobpaul 2025-02-15 05:15:24 -05:00
parent 6fc62f3ad9
commit e06dd69435
2 changed files with 14 additions and 3 deletions

View File

@ -10,6 +10,8 @@ pkgbase = netbird
arch = armv6h
arch = aarch64
arch = riscv64
arch = powerpc64le
arch = powerpc64
license = BSD-3-Clause
makedepends = go
source = netbird-0.36.3.tar.gz::https://github.com/netbirdio/netbird/archive/refs/tags/v0.36.3.tar.gz

View File

@ -12,7 +12,7 @@ pkgname=(
pkgver=0.36.3
pkgrel=1
url='https://netbird.io'
arch=(i686 pentium4 x86_64 arm armv7h armv6h aarch64 riscv64 powerpc64le)
arch=(i686 pentium4 x86_64 arm armv7h armv6h aarch64 riscv64 powerpc64le powerpc64)
license=(BSD-3-Clause)
makedepends=('go')
@ -44,12 +44,21 @@ prepare() {
}
build() {
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
cd "$srcdir/$pkgbase-$pkgver"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
case "${CARCH}" in
powerpc64)
export GOFLAGS="-trimpath -mod=readonly -modcacherw"
;;
*)
LINKMODE="-linkmode external"
;;
esac
go build \
-o build \
-ldflags "-s -w -linkmode=external -X github.com/netbirdio/$pkgname/version.version=$pkgver -extldflags \"$LDFLAGS\"" \
-ldflags "-s -w ${LINKMODE} -X github.com/netbirdio/$pkgname/version.version=$pkgver -extldflags \"$LDFLAGS\"" \
./client ./signal ./management ./relay
# relay does not support completions