summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhuvan2018-06-08 21:43:47 +0530
committerRaghavendra Bhuvan2018-06-08 21:43:47 +0530
commit0eb9d388a9b326b54ba6ff4b705027a1fe1e34ef (patch)
tree128e2ad2045503753e8b892df3ca7d8526706a94
downloadaur-0eb9d388a9b326b54ba6ff4b705027a1fe1e34ef.tar.gz
Initial package version at v2.0.5
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD50
2 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5462c89905ad
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = git-user
+ pkgdesc = Git plugin that allows you to save multiple user profiles and set them as project defaults
+ pkgver = v2.0.5
+ pkgrel = 1
+ url = https://github.com/gesquive/git-user.git
+ arch = any
+ license = MIT
+ makedepends = git
+ depends = go
+ options = !strip
+ options = !emptydirs
+
+pkgname = git-user
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a76f06f9fae2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Raghavendra Bhuvan <rage28@googlemail.com>
+pkgname=git-user
+pkgver=v2.0.5
+pkgrel=1
+pkgdesc=" Git plugin that allows you to save multiple user profiles and set them as project defaults"
+arch=('any')
+url="https://github.com/gesquive/${pkgname}.git"
+license=('MIT')
+depends=('go')
+makedepends=('git')
+options=('!strip' '!emptydirs')
+_gourl="github.com/gesquive/${pkgname}"
+
+prepare() {
+ # if a global GOPATH is already set push save it
+ if [ ! -z "$GOPATH" ];then
+ PREV_GOPATH=$GOPATH
+ fi
+ unset GOPATH
+}
+
+build() {
+ GOPATH="$srcdir" go get -fix -v -x ${_gourl}
+}
+
+check() {
+ GOPATH="$GOPATH:$srcdir" go test -v -x ${_gourl}
+}
+
+package() {
+ mkdir -p "$pkgdir/usr/bin"
+ install -p -m755 "$srcdir/bin/"* "$pkgdir/usr/bin"
+
+ mkdir -p "$pkgdir/$GOPATH"
+ cp -Rv --preserve=timestamps "$srcdir/"{src,pkg} "$pkgdir/$GOPATH" &>/dev/null || :
+
+ # Package license (if available)
+ for f in LICENSE COPYING LICENSE.* COPYING.*; do
+ if [ -e "$srcdir/src/$_gourl/$f" ]; then
+ install -Dm644 "$srcdir/src/$_gourl/$f" "$pkgdir/usr/share/licenses/$pkgname/$f"
+ fi
+ done
+
+ unset GOPATH
+ # if previous GOPATH detected export it back
+ if [ ! -z "$PREV_GOPATH" ];then
+ export GOPATH=${PREV_GOPATH}
+ unset PREV_GOPATH
+ fi
+}