summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorwenLiangcan2016-03-25 13:33:32 +0800
committerwenLiangcan2016-03-25 13:33:32 +0800
commitaeecc4e060075fef081435861a3b91d1fb0d3e06 (patch)
treee6427e2781f63384cb059e6145de51023b6d8005 /PKGBUILD
parentced3bc790cf2260b316f648335131fa85f686cfb (diff)
downloadaur-aeecc4e060075fef081435861a3b91d1fb0d3e06.tar.gz
goimports-git 1:r1800.824b504-1.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD31
1 files changed, 12 insertions, 19 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 13633f3a6ac9..eed4ae44c485 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,32 +1,25 @@
# Maintainer: wenLiangcan <boxeed at gmail dot com>
-pkgname=goimports-git
_pkgname=goimports
-pkgver=20141212
+pkgname=${_pkgname}-git
+pkgver=r1800.824b504
+epoch=1
pkgrel=1
pkgdesc="Tool to fix (add, remove) your Go imports automatically."
-arch=("any")
+arch=('i686' 'x86_64')
url="https://github.com/bradfitz/goimports"
-license=('Other')
+license=('MIT')
makedepends=('git' 'go' 'mercurial')
-provides=('goimports')
-source=("${_pkgname}"::'git://github.com/bradfitz/goimports.git')
-md5sums=('SKIP')
+provides=("${_pkgname}")
+_src='golang.org/x/tools/cmd/goimports'
pkgver() {
- cd "${srcdir}/${_pkgname}"
- git log -1 --format='%cd' --date=short | tr -d -- '-'
-}
-
-build() {
- cd "${_pkgname}"
- export GOPATH=${srcdir}
- go get "golang.org/x/tools/cmd/goimports"
- go build -o "${_pkgname}"
+ GOPATH=${srcdir} go get -fix -u ${_src}
+ cd src/${_src}
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
- cd ${_pkgname}
- install -Dm755 "${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
- install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE"
+ install -Dm755 bin/${_pkgname} $pkgdir/usr/bin/${_pkgname}
}
+