summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD46
1 files changed, 24 insertions, 22 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4cd82ea88a6f..69f7615e2bcb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,38 @@
-# Maintainer: Dmitri Goutnik <dg@syrec.org>
+# Maintainer: João Vitor S. Anjos <jvanjos at protonmail dot com>
+# Contributor: Dmitri Goutnik <dg@syrec.org>
pkgname=trdsql
-pkgver=0.7.4
+pkgver=0.9.0
pkgrel=1
pkgdesc="Tool that can execute SQL queries on CSV, LTSV and JSON"
arch=('i686' 'x86_64')
url="https://github.com/noborus/trdsql"
license=('MIT')
depends=('glibc')
-makedepends=('go-pie')
-source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
-sha256sums=('f3bf3dd0106d459c03c59b42cff0f4acab35708aa250ca5b034631da30cf4b49')
-
+makedepends=('go')
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
+sha256sums=('677bfe22c8eba6c538ff57cb9fbfe575953ec9e48d9dbb1f14d5701823b99303')
build() {
- cd "$pkgname-$pkgver"
- go build \
- -mod=vendor \
- -trimpath \
- -ldflags "-extldflags $LDFLAGS" \
- -o $pkgname .
-}
+ export GOPATH="${srcdir}/go"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export CGO_ENABLED=1
-#check() {
-# cd "$pkgname-$pkgver"
-# go test -mod=vendor ./...
-#}
+ cd ${pkgname}-${pkgver}
+ make VERSION="v${pkgver}" DESTDIR="{$pkgdir}" PREFIX="/usr"
+}
package() {
- cd "$pkgname-$pkgver"
- install -Dm755 trdsql "${pkgdir}/usr/bin/${pkgname}"
- install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
- install -Dm644 completion/trdsql-completion.zsh "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
+ cd ${pkgname}-${pkgver}
+ export GOBIN="${pkgdir}/usr/bin"
+ make VERSION="v${pkgver}" DESTDIR="{$pkgdir}" PREFIX="/usr" install
+
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+ install -Dm 644 completion/trdsql-completion.zsh "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
}
+
+# vim: ts=2 sw=2 et: