summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0791efd7fa9b1eff172990853ec903d2ac14dae7 (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
40
41
42
43
44
45
46
47
# Maintainer :         Kr1ss $(echo \<kr1ss+x-yandex+com\>|sed s/\+/./g\;s/\-/@/)
# Contributor :        Aniket-Pradhan <aniket17133@iiitd.ac.in>
# Owner/Contributor :  Paul Bergeron https://github.com/dinedal


pkgname=textql-git
_pkgname="${pkgname%-git}"

pkgver() { git -C "$_pkgname" describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g'; }
pkgver=2.0.3.r48.1d6fef5
pkgrel=2

pkgdesc='Execute SQL against structured text like CSV or TSV'
arch=('x86_64')
url="https://github.com/dinedal/$_pkgname"
license=('MIT')

makedepends=('git' 'go-pie')

options=('!emptydirs' 'zipman')

source=("git+$url.git")
sha256sums=('SKIP')


prepare(){
  mkdir -p gopath/src/github.com
  ln -rsf "$_pkgname" gopath/src/github.com/
  cd "gopath/src/github.com/$_pkgname"
  GOPATH="$srcdir/gopath" go get -v -d ./...
}

build(){
  cd "gopath/src/github.com/$_pkgname"
  GOPATH="$srcdir/gopath" go build -v -ldflags "-X main.VERSION=$(<VERSION) -s" textql/main.go
}

package() {
  cd "$_pkgname"
  install -Dm755 main                         "$pkgdir/usr/bin/$_pkgname"
  install -Dm644 LICENSE                    -t"$pkgdir/usr/share/licenses/$_pkgname/"
  install -Dm644 Readme.md textql_usage.gif -t"$pkgdir/usr/share/doc/$_pkgname/"
  install -Dm644 "man/$_pkgname.1"          -t"$pkgdir/usr/share/man/man1/"
}


# vim: ts=2 sw=2 et ft=PKGBUILD: