diff options
author | KenjiTakahashi | 2024-02-20 12:03:00 +0100 |
---|---|---|
committer | KenjiTakahashi | 2024-02-20 12:03:00 +0100 |
commit | 59c5edc4692c4caede20342a24d246d71ba67d55 (patch) | |
tree | 2f3e054187ff9f31f09c1fed552ac9600fa8e96f /PKGBUILD | |
parent | aeff88bbe2cc7c46f1287e0896e73f7f42fc02c0 (diff) | |
download | aur-59c5edc4692c4caede20342a24d246d71ba67d55.tar.gz |
3.5.1-2: Use new-style FLAGS setting to fix compilation
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 28 |
1 files changed, 15 insertions, 13 deletions
@@ -3,7 +3,7 @@ pkgname=archiver pkgver=3.5.1 -pkgrel=1 +pkgrel=2 pkgdesc="Easily create & extract archives, and compress & decompress files of various formats" arch=("x86_64") url="https://github.com/mholt/archiver" @@ -13,24 +13,26 @@ depends=("glibc") source=("${pkgname}-${pkgver}.tar.gz::https://github.com/mholt/archiver/archive/v${pkgver}.tar.gz") build() { - cd "${pkgname}-${pkgver}" - go build \ - -trimpath \ - -buildmode=pie \ - -mod=readonly \ - -ldflags "-linkmode external -extldflags ${LDFLAGS}" \ - -o . ./cmd/arc/... + cd "${pkgname}-${pkgver}" + + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + + go build -o . ./cmd/arc/ } check() { - cd "${pkgname}-${pkgver}" - go test ./... + cd "${pkgname}-${pkgver}" + go test ./... } package() { - cd "${pkgname}-${pkgver}" + cd "${pkgname}-${pkgver}" - install -Dm755 arc -t "${pkgdir}/usr/bin" - install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -Dm755 arc -t "${pkgdir}/usr/bin" + install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" } sha256sums=('b69a76f837b6cc1c34c72ace16670360577b123ccc17872a95af07178e69fbe7') |