summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD39
2 files changed, 51 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d08894d2fba4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,12 @@
+pkgbase = ov
+ pkgdesc = Feature-rich terminal-based text viewer
+ pkgver = 0.13.0
+ pkgrel = 1
+ url = https://github.com/noborus/ov
+ arch = x86_64
+ license = MIT
+ makedepends = go
+ source = ov-0.13.0.tar.gz::https://github.com/noborus/ov/archive/v0.13.0.tar.gz
+ b2sums = 6c04df6d02d7291c96560e78b582a4e7cf57c018010bdc2548d7d3307138e34f74cffc2208f1ae012c8321e2f7cda1272192f6df4242b2d03b2f6be5d8e0776d
+
+pkgname = ov
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"
+}