diff options
author | Kr1ss | 2020-05-18 22:00:21 +0200 |
---|---|---|
committer | Kr1ss | 2020-05-18 22:00:21 +0200 |
commit | d21b8821bd2d237034ca64515c1b8ec5543c2515 (patch) | |
tree | 331043d1dac4b86f98c3cba956de950149d08b47 /PKGBUILD | |
parent | d2fcbea84b4ff63e46f33ca41630a7d1b51c438b (diff) | |
download | aur-textql-git.tar.gz |
refactor PKGBUILD
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 38 |
1 files changed, 17 insertions, 21 deletions
@@ -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: |