summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwenLiangcan2015-06-08 23:13:00 +0800
committerwenLiangcan2015-06-08 23:13:00 +0800
commitced3bc790cf2260b316f648335131fa85f686cfb (patch)
tree235385146ed11d038e6f508620c4002f5732fdd3
downloadaur-ced3bc790cf2260b316f648335131fa85f686cfb.tar.gz
goimports-git 20141212-1.
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD32
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"
+}