summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorStephen Gregoratto2018-11-18 22:29:43 +1100
committerStephen Gregoratto2018-11-18 22:29:43 +1100
commit9d0d57c52ecb4970bb3ba4c197b89cc753a93615 (patch)
tree61291c69b156c3a0a13ece6b7a3baf1bb915606a /PKGBUILD
downloadaur-9d0d57c52ecb4970bb3ba4c197b89cc753a93615.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD30
1 files changed, 30 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2592d04f8740
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: KingofToasters <themanhimself at sgregoratto dot me>
+pkgname=goawk
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="AWK interpreter written in go"
+url="https://github.com/benhoyt/goawk"
+license=('MIT')
+arch=('i686' 'x86_64' 'armv6h' 'armv7h')
+makedepends=('go-pie')
+source=("$url/archive/v$pkgver.tar.gz")
+sha256sums=('727256152cceca2758d667143dbe18ab96243e7a7206ddf3beec60cd4ebbd3fa')
+
+build() {
+ cd "${pkgname}-${pkgver}"
+ go build \
+ -gcflags "all=-trimpath=${PWD}" \
+ -asmflags "all=-trimpath=${PWD}" \
+ -ldflags "-extldflags ${LDFLAGS}" \
+ -o "${pkgname}" .
+}
+
+check(){
+ cd "${pkgname}-${pkgver}"
+ go test ./...
+}
+
+package() {
+ install -Dm755 "${pkgname}-${pkgver}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm644 "${pkgname}-${pkgver}/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENCE"
+}