diff --git a/packages/alist/PKGBUILD b/packages/alist/PKGBUILD index cbb2345..08ccf9c 100644 --- a/packages/alist/PKGBUILD +++ b/packages/alist/PKGBUILD @@ -2,7 +2,7 @@ pkgname='alist' pkgver=3.30.0 -pkgrel=4 +pkgrel=5 pkgdesc='A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs.' url="https://github.com/alist-org/alist" license=('AGPL-3.0-or-later') @@ -33,9 +33,15 @@ prepare() { } build() { + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-v -x -work -modcacherw -trimpath -buildmode=pie -mod=readonly" + cd "${srcdir}/${pkgname}-${pkgver}" - go build -v -x -work -trimpath -buildmode=pie -o "${srcdir}/${pkgname}" \ - -ldflags="-w -s \ + go build -o "${srcdir}/${pkgname}" \ + -ldflags="-w -s -linkmode external \ -X 'github.com/alist-org/alist/v3/internal/conf.BuiltAt=$(date +"%F %T %z")' \ -X 'github.com/alist-org/alist/v3/internal/conf.GoVersion=$(go version | sed "s/go version //")' \ -X 'github.com/alist-org/alist/v3/internal/conf.Version=${pkgver}'"