summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD40
2 files changed, 52 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..abcb74654316
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,12 @@
+pkgbase = gat-git
+ pkgdesc = Cat alternative written in Go.
+ pkgver = r130.3f578d4
+ pkgrel = 1
+ url = https://github.com/koki-develop/gat
+ arch = x86_64
+ license = GPL
+ makedepends = go
+ source = gat-git::git+https://github.com/koki-develop/gat.git
+ sha256sums = SKIP
+
+pkgname = gat-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cfeb89deb810
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+pkgname=gat-git
+pkgver=r130.3f578d4
+pkgrel=1
+pkgdesc='Cat alternative written in Go.'
+arch=('x86_64')
+url="https://github.com/koki-develop/gat"
+license=('GPL')
+makedepends=('go')
+source=("$pkgname::git+https://github.com/koki-develop/gat.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
+}
+
+prepare(){
+ cd "$pkgname"
+ mkdir -p build/
+}
+
+build() {
+ cd "$pkgname"
+ 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 build
+}
+
+check() {
+ cd "$pkgname"
+ go test ./...
+}
+
+package() {
+ cd "$pkgname"
+ install -Dm755 "$srcdir"/"$pkgname"/build/gat "$pkgdir"/usr/bin/gat
+}