diff options
author | George Rawlinson | 2022-01-12 02:59:15 +0000 |
---|---|---|
committer | George Rawlinson | 2022-01-12 02:59:15 +0000 |
commit | efa68dd70d41e953641d5d34d1ba4ace4a5f096d (patch) | |
tree | 225db9c496cdf7b0fd229b147454aaf62de2ae1a | |
download | aur-efa68dd70d41e953641d5d34d1ba4ace4a5f096d.tar.gz |
addpkg: dsq r9-1
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 57 |
2 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..087745c03052 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = dsq + pkgdesc = CLI tool for running SQL queries against JSON/CSV/Excel/Parquet and more + pkgver = r9.dedd036 + pkgrel = 1 + url = https://github.com/multiprocessio/dsq + arch = x86_64 + license = Apache + checkdepends = jq + makedepends = git + makedepends = go + depends = glibc + options = !lto + source = dsq::git+https://github.com/multiprocessio/dsq.git#commit=dedd036b10c5e2b2991bc27ef94204eed8c0703f + md5sums = SKIP + +pkgname = dsq diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4537aefb069f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Your Name <youremail@domain.com> + +pkgname=dsq +pkgver=r9.dedd036 +pkgrel=1 +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=('jq') +options=('!lto') +_commit='dedd036b10c5e2b2991bc27ef94204eed8c0703f' +source=("$pkgname::git+$url.git#commit=$_commit") +md5sums=('SKIP') + +pkgver() { + cd "$pkgname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +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}" \ + . +} + +check() { + cd "$pkgname" + + ./scripts/test.sh +} + +package() { + cd "$pkgname" + + install -vDm755 -t "$pkgdir/usr/bin" dsq +} |