diff options
author | wenLiangcan | 2015-06-08 23:13:00 +0800 |
---|---|---|
committer | wenLiangcan | 2015-06-08 23:13:00 +0800 |
commit | ced3bc790cf2260b316f648335131fa85f686cfb (patch) | |
tree | 235385146ed11d038e6f508620c4002f5732fdd3 | |
download | aur-ced3bc790cf2260b316f648335131fa85f686cfb.tar.gz |
goimports-git 20141212-1.
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 32 |
2 files changed, 48 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d249f0717d90 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = goimports-git + pkgdesc = Tool to fix (add, remove) your Go imports automatically. + pkgver = 20141212 + pkgrel = 1 + url = https://github.com/bradfitz/goimports + arch = any + license = Other + makedepends = git + makedepends = go + makedepends = mercurial + provides = goimports + source = goimports::git://github.com/bradfitz/goimports.git + md5sums = SKIP + +pkgname = goimports-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..13633f3a6ac9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: wenLiangcan <boxeed at gmail dot com> + +pkgname=goimports-git +_pkgname=goimports +pkgver=20141212 +pkgrel=1 +pkgdesc="Tool to fix (add, remove) your Go imports automatically." +arch=("any") +url="https://github.com/bradfitz/goimports" +license=('Other') +makedepends=('git' 'go' 'mercurial') +provides=('goimports') +source=("${_pkgname}"::'git://github.com/bradfitz/goimports.git') +md5sums=('SKIP') + +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}" +} + +package() { + cd ${_pkgname} + install -Dm755 "${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}" + install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE" +} |