summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Gathoye2017-03-13 23:33:17 +0100
committerWilliam Gathoye2017-03-13 23:33:17 +0100
commitf0ede20ba6eb1afd942a9cf62488318fc77c8d92 (patch)
tree506cea98381e85d8d00eee6e3334f01251880f02
parent26821cad488c241ce671507f0bb381dca75abc44 (diff)
downloadaur-mattermosti18n-git.tar.gz
Remove unneeded var and do not use pwd anymore
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD15
2 files changed, 13 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cf532f84d802..6eeae93e3817 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 82bce839ae05..fa54d7e9d420 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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() {