diff options
author | William Gathoye | 2017-03-13 23:33:17 +0100 |
---|---|---|
committer | William Gathoye | 2017-03-13 23:33:17 +0100 |
commit | f0ede20ba6eb1afd942a9cf62488318fc77c8d92 (patch) | |
tree | 506cea98381e85d8d00eee6e3334f01251880f02 | |
parent | 26821cad488c241ce671507f0bb381dca75abc44 (diff) | |
download | aur-mattermosti18n-git.tar.gz |
Remove unneeded var and do not use pwd anymore
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 15 |
2 files changed, 13 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = mattermosti18n-git pkgdesc = A tool for Mattermost used to convert translations between GNU gettext .po and JSON files pkgver = r23.7e95378 - pkgrel = 1 + pkgrel = 2 url = https://github.com/rodcorsi/mattermosti18n arch = x86_64 arch = i686 @@ -2,9 +2,8 @@ # Contributor: pkgname=mattermosti18n-git -_pkgname="${pkgname%-git}" pkgver=r23.7e95378 -pkgrel=1 +pkgrel=2 pkgdesc='A tool for Mattermost used to convert translations between GNU gettext .po and JSON files' arch=('x86_64' 'i686') @@ -32,11 +31,21 @@ prepare() { mkdir -p 'src/github.com/rodcorsi/mattermosti18n' # go build does not support symlinks. Do not use this. # ln -s "$_pkgname" "src/github.com/rodcorsi/$_pkgname" + # Only copies files not dotfiles/dotfolders like .git cp -R mattermosti18n/* ./src/github.com/rodcorsi/mattermosti18n } build() { - GOPATH=$(pwd) go install github.com/rodcorsi/mattermosti18n/... + # Do not define GOPATH like "$GOPATH:$srcdir". As GOPATH is empty by + # default, the ':' will be present at the biginning of the sttring and go + # will complain with: + # go: GOPATH entry is relative; must be absolute path: "". + # Using the -pkgdir argument cannot be used for this use case either. + GOPATH="$srcdir" go install github.com/rodcorsi/mattermosti18n/... +} + +check() { + GOPATH="$srcdir" go test -v -x github.com/rodcorsi/mattermosti18n... } package() { |