diff options
author | lmartinez-mirror | 2021-03-24 19:04:33 -0500 |
---|---|---|
committer | lmartinez-mirror | 2021-03-24 19:04:33 -0500 |
commit | 4e11a77cf02d35cd2b73042de555d0593ee8196b (patch) | |
tree | 8f533a3b7bdadbee7cef7e2d93123f98b20d1e5a /PKGBUILD | |
parent | 32b2ec5989b445d24b7427e6e6ed2753d9e09a92 (diff) | |
download | aur-4e11a77cf02d35cd2b73042de555d0593ee8196b.tar.gz |
use Makefile for building; add aarch64 support
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 29 |
1 files changed, 16 insertions, 13 deletions
@@ -1,10 +1,10 @@ # Maintainer: lmartinez-mirror pkgname=hilbish-git _pkgname=${pkgname%-git} -pkgver=0.0.12.r5.g9cc9c4a -pkgrel=1 +pkgver=0.1.2.r0.gdeb1bc8 +pkgrel=2 pkgdesc="A shell written in Go and extended with Lua" -arch=('x86_64') +arch=('x86_64' 'aarch64') url="https://github.com/hilbis/hilbish" license=('MIT') depends=('readline') @@ -20,22 +20,25 @@ pkgver() { git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./' } +prepare() { + cd "$pkgname" + sed -i "s|/usr|$pkgdir/usr|" Makefile +} + build() { + 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" + cd "$pkgname" - go build \ - -trimpath \ - -buildmode=pie \ - -mod=readonly \ - -modcacherw \ - -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" + make build } package() { cd "$pkgname" - install -Dm 755 hilbish -t "$pkgdir/usr/bin/" - install -Dm 644 preload.lua -t "$pkgdir/usr/share/$_pkgname/" - install -Dm 644 .hilbishrc.lua -t "$pkgdir/usr/share/$_pkgname/" - find libs -type f -exec install -Dm 644 '{}' "$pkgdir/usr/share/$_pkgname/{}" \; + make install install -Dm 444 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" install -Dm 444 README.md -t "$pkgdir/usr/share/doc/$pkgname/" } |