diff options
author | Vladimir Gorbunov | 2017-01-08 03:29:24 +0300 |
---|---|---|
committer | Vladimir Gorbunov | 2017-01-08 03:29:24 +0300 |
commit | b16c2ff6806ece7eea0b12a6c4d48fb37aef845a (patch) | |
tree | 830e64e14d65c7662c85a80f31dc17f8de20f969 | |
parent | 3f247e86ac5d5b17b6f7a27e135fa01678957ffa (diff) | |
download | aur-b16c2ff6806ece7eea0b12a6c4d48fb37aef845a.tar.gz |
Fix building errors
-rw-r--r-- | .SRCINFO | 1 | ||||
-rw-r--r-- | PKGBUILD | 20 |
2 files changed, 15 insertions, 6 deletions
@@ -7,6 +7,7 @@ pkgbase = gmtrn-cli arch = i686 license = MIT makedepends = go + makedepends = git options = !strip options = !emptydirs source = https://github.com/vladimir-g/gmtrn/archive/v0.1.tar.gz @@ -7,19 +7,27 @@ pkgdesc="Simple CLI client for http://multitran.ru" arch=('x86_64' 'i686') url="https://github.com/vladimir-g/gmtrn" license=('MIT') -makedepends=('go') +makedepends=('go' 'git') options=('!strip' '!emptydirs') source=("https://github.com/vladimir-g/gmtrn/archive/v${pkgver}.tar.gz") sha256sums=('a3caab19db19f771ea91b99a5138df61a3991fe2bfea2f521a7a91d06f29c030') _srcname=gmtrn +_gourl=github.com/vladimir-g/${_srcname} build() { - cd "${_srcname}-${pkgver}/cmd/${pkgname}" - go build + export GOROOT=/usr/lib/go + rm -rf "${srcdir}/build" + mkdir -p "${srcdir}/build" + export GOPATH="${srcdir}/build" + mkdir -p "${GOPATH}/src/github.com/vladimir-g" + mv "${_srcname}-${pkgver}" "${GOPATH}/src/${_gourl}" + cd "${GOPATH}/src/${_gourl}/cmd/${pkgname}" + go get + go build } package() { - cd "${_srcname}-${pkgver}" - install -Dm755 "cmd/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/$pkgname" - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/$pkgname/LICENSE" + cd "${srcdir}/build/src/${_gourl}" + install -Dm755 "cmd/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/$pkgname" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/$pkgname/LICENSE" } |