diff options
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 38 |
2 files changed, 21 insertions, 24 deletions
@@ -1,14 +1,15 @@ pkgbase = textql-git pkgdesc = Execute SQL against structured text like CSV or TSV - pkgver = 2.0.3.r44.730ab91 + pkgver = 2.0.3.r48.1d6fef5 pkgrel = 2 url = https://github.com/dinedal/textql arch = x86_64 license = MIT - depends = go-pie + makedepends = git + makedepends = go-pie options = !emptydirs options = zipman - source = git+https://github.com/dinedal/textql + source = git+https://github.com/dinedal/textql.git sha256sums = SKIP pkgname = textql-git @@ -2,50 +2,46 @@ # Contributor : Aniket-Pradhan <aniket17133@iiitd.ac.in> # Owner/Contributor : Paul Bergeron https://github.com/dinedal + pkgname=textql-git _pkgname="${pkgname%-git}" -pkgver() { - cd "$_pkgname" - git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g' -} -pkgver=2.0.3.r44.730ab91 + +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" +pkgdesc='Execute SQL against structured text like CSV or TSV' arch=('x86_64') url="https://github.com/dinedal/$_pkgname" license=('MIT') -depends=('go-pie') +makedepends=('git' 'go-pie') -options=('!emptydirs' zipman) +options=('!emptydirs' 'zipman') -source=("git+$url") +source=("git+$url.git") sha256sums=('SKIP') -prepare(){ - export GOPATH="$srcdir/gopath" - mkdir -p "$GOPATH/src/github.com" - ln -rTsf "$_pkgname" "$GOPATH/src/github.com/$_pkgname" - cd "$GOPATH/src/github.com/$_pkgname" - go get -v -d ./... +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(){ - export GOPATH="$srcdir/gopath" - cd "$GOPATH/src/github.com/$_pkgname" - - go build -v -ldflags "-X main.VERSION=`cat VERSION` -s" textql/main.go + 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/textql" + 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: |