summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkeysym2021-08-19 23:13:37 -0300
committerkeysym2021-08-19 23:14:26 -0300
commit2fb2857d5d03c61958335b633c818efaf1638bfc (patch)
tree68c8301da8c4fbbac7fc3c8fdff92d603f1af2dc
parentfd06ed81ab023dfa1b03f6628fbe613dc0a91d5b (diff)
downloadaur-2fb2857d5d03c61958335b633c818efaf1638bfc.tar.gz
Adopt; upgpkg: 0.9.0
Add .gitignore Rewrite build and install functions
-rw-r--r--.SRCINFO9
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD46
3 files changed, 32 insertions, 27 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7f5d5e570a95..d07e8f6ae77b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
pkgbase = trdsql
pkgdesc = Tool that can execute SQL queries on CSV, LTSV and JSON
- pkgver = 0.7.4
+ pkgver = 0.9.0
pkgrel = 1
url = https://github.com/noborus/trdsql
arch = i686
arch = x86_64
license = MIT
- makedepends = go-pie
+ makedepends = go
depends = glibc
- source = trdsql-0.7.4.tar.gz::https://github.com/noborus/trdsql/archive/v0.7.4.tar.gz
- sha256sums = f3bf3dd0106d459c03c59b42cff0f4acab35708aa250ca5b034631da30cf4b49
+ source = trdsql-0.9.0.tar.gz::https://github.com/noborus/trdsql/archive/refs/tags/v0.9.0.tar.gz
+ sha256sums = 677bfe22c8eba6c538ff57cb9fbfe575953ec9e48d9dbb1f14d5701823b99303
pkgname = trdsql
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..3767034074ba
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg/
+src/
+*.tar.zst
+*.tar.gz
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: