blob: e5962a28f79d764768c1e1998dfd5432759e1f4e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# Maintainer: João Vitor S. Anjos <jvanjos at protonmail dot com>
# Contributor: Dmitri Goutnik <dg@syrec.org>
pkgname=trdsql
pkgver=1.1.0
pkgrel=1
pkgdesc="CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN"
arch=('any')
url="https://github.com/noborus/trdsql"
license=('MIT')
depends=('glibc')
makedepends=('go')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('e3b8bef57330648d3f4b279bd4c652eaeba19aa4fae3fe05cfa596a2b3f4bc51')
build() {
cd ${pkgname}-${pkgver}
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"
export GOPATH="${srcdir}/go"
make VERSION="v${pkgver}" DESTDIR="${pkgdir}" PREFIX="/usr"
}
package() {
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:
|