summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD39
1 files changed, 39 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..702f85c68ffa
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Mike Yuan <me@yhndnzj.com>
+
+pkgname=ov
+pkgver=0.13.0
+pkgrel=1
+pkgdesc="Feature-rich terminal-based text viewer"
+arch=('x86_64')
+url="https://github.com/noborus/ov"
+license=('MIT')
+makedepends=('go')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+b2sums=('6c04df6d02d7291c96560e78b582a4e7cf57c018010bdc2548d7d3307138e34f74cffc2208f1ae012c8321e2f7cda1272192f6df4242b2d03b2f6be5d8e0776d')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ mkdir -p build/
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ export CGO_CFLAGS="$CFLAGS"
+ export CGO_CXXFLAGS="$CXXFLAGS"
+ export CGO_CPPFLAGS="$CPPFLAGS"
+ export CGO_LDFLAGS="$LDFLAGS"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+
+ go build -o build
+}
+
+check() {
+ cd "$pkgname-$pkgver"
+ go test
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ install -Dm755 "build/$pkgname" "$pkgdir/usr/bin/$pkgname"
+}