summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlmartinez-mirror2021-03-24 19:04:33 -0500
committerlmartinez-mirror2021-03-24 19:04:33 -0500
commit4e11a77cf02d35cd2b73042de555d0593ee8196b (patch)
tree8f533a3b7bdadbee7cef7e2d93123f98b20d1e5a
parent32b2ec5989b445d24b7427e6e6ed2753d9e09a92 (diff)
downloadaur-4e11a77cf02d35cd2b73042de555d0593ee8196b.tar.gz
use Makefile for building; add aarch64 support
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD29
2 files changed, 19 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7e54156dbae8..994b20f56a04 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,10 @@
pkgbase = hilbish-git
pkgdesc = A shell written in Go and extended with Lua
- pkgver = 0.0.12.r5.g9cc9c4a
- pkgrel = 1
+ pkgver = 0.1.2.r0.gdeb1bc8
+ pkgrel = 2
url = https://github.com/hilbis/hilbish
arch = x86_64
+ arch = aarch64
license = MIT
makedepends = git
makedepends = go>=1.16
diff --git a/PKGBUILD b/PKGBUILD
index 06e17926fc2d..0b72b2d79bc0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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/"
}