Date: Friday, October 28, 2022 @ 04:04:31
Author: grawlinson
Revision: 1338326
archrelease: copy trunk to community-x86_64
Added:
dsq/repos/community-x86_64/
dsq/repos/community-x86_64/PKGBUILD
(from rev 1338325, dsq/trunk/PKGBUILD)
----------+
PKGBUILD | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
Copied: dsq/repos/community-x86_64/PKGBUILD (from rev 1338325,
dsq/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2022-10-28 04:04:31 UTC (rev 1338326)
@@ -0,0 +1,68 @@
+# Maintainer: George Rawlinson <[email protected]>
+
+pkgname=dsq
+pkgver=0.23.0
+pkgrel=2
+pkgdesc='CLI tool for running SQL queries against JSON/CSV/Excel/Parquet and
more'
+arch=('x86_64')
+url='https://github.com/multiprocessio/dsq'
+license=('Apache')
+depends=('glibc')
+makedepends=('git' 'go')
+checkdepends=('python' 'jq' 'p7zip')
+options=('!lto')
+_commit='0ff1a1218f57fbd81d9dae48e82cbe3f24572b88'
+source=("$pkgname::git+$url.git#commit=$_commit")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+
+ git describe --tags | sed 's/^v//'
+}
+
+prepare() {
+ cd "$pkgname"
+
+ # download dependencies
+ go mod download
+}
+
+build() {
+ cd "$pkgname"
+
+ # set Go flags
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+
+ go build -v \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-linkmode external -extldflags ${LDFLAGS} \
+ -X main.Version=$pkgver" \
+ .
+}
+
+check() {
+ cd "$pkgname"
+
+ # fix failing test
+ sed \
+ -i scripts/test.py \
+ -e "s/dsq latest/dsq $pkgver/"
+
+ # setup taxi.csv
+ 7z e testdata/taxi.csv.7z
+
+ # ensure chatter from systemd-nspawn doesn't modify expected stdout
+ LC_ALL=C ./scripts/test.py
+}
+
+package() {
+ cd "$pkgname"
+
+ install -vDm755 -t "$pkgdir/usr/bin" dsq
+}