summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Gorbunov2017-01-08 02:57:34 +0300
committerVladimir Gorbunov2017-01-08 02:57:34 +0300
commit442548d1ba31277a787cdcb588272f6ec40d15a0 (patch)
tree37d3a5ac9e838279a09b993c01448752e62517e0
parentec20375ada62024d4731f9d094e5dd63beb26470 (diff)
downloadaur-442548d1ba31277a787cdcb588272f6ec40d15a0.tar.gz
Use release tarball instead of raw git clone
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD29
2 files changed, 12 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7827569d24cd..92151ae7908b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = gmtrn-cli
pkgdesc = Simple CLI client for http://multitran.ru
- pkgver = r14.d058bb6
+ pkgver = 0.1
pkgrel = 1
url = https://github.com/vladimir-g/gmtrn
arch = x86_64
@@ -10,8 +10,8 @@ pkgbase = gmtrn-cli
makedepends = git
options = !strip
options = !emptydirs
- source = gmtrn-cli::git+https://github.com/vladimir-g/gmtrn.git
- md5sums = SKIP
+ source = https://github.com/vladimir-g/gmtrn/archive/v0.1.tar.gz
+ sha256sums = a3caab19db19f771ea91b99a5138df61a3991fe2bfea2f521a7a91d06f29c030
pkgname = gmtrn-cli
diff --git a/PKGBUILD b/PKGBUILD
index e872b6ea939e..f26e379c73f5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Vladimir Gorbunov <truedaemon@gmail.com>
pkgname=gmtrn-cli
-pkgver=r14.d058bb6
+pkgver=0.1
pkgrel=1
pkgdesc="Simple CLI client for http://multitran.ru"
arch=('x86_64' 'i686')
@@ -9,28 +9,17 @@ url="https://github.com/vladimir-g/gmtrn"
license=('MIT')
makedepends=('go' 'git')
options=('!strip' '!emptydirs')
-source=("${pkgname}::git+https://github.com/vladimir-g/gmtrn.git")
-md5sums=('SKIP')
-_gourl="github.com/vladimir-g/gmtrn"
-
-pkgver() {
- cd "$pkgname"
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
-}
-
-prepare() {
- mkdir -p $(dirname "$srcdir"/src/"${_gourl}")
- # remove old source directory if exists
- rm -Rf "$srcdir"/src/"${_gourl}"
- mv "$pkgname" "$srcdir"/src/"${_gourl}"
-}
+source=("https://github.com/vladimir-g/gmtrn/archive/v${pkgver}.tar.gz")
+sha256sums=('a3caab19db19f771ea91b99a5138df61a3991fe2bfea2f521a7a91d06f29c030')
+_srcname=gmtrn
build() {
- GOPATH="$srcdir" go get -v -x "${_gourl}/"...
+ cd "${_srcname}-${pkgver}/cmd/${pkgname}"
+ go build
}
package() {
- mkdir -p "$pkgdir/usr/bin"
- install -Dm755 "$srcdir/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
- install -Dm644 "$srcdir/src/$_gourl/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ cd "${_srcname}-${pkgver}"
+ install -Dm755 "cmd/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/$pkgname"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
}