summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Lundberg2019-05-27 00:19:16 +0200
committerEmil Lundberg2019-05-27 00:19:16 +0200
commit314bb298c31b481cafd89ebe6529d3ca094f1b61 (patch)
treef778941c79ece372dc041d01d05c452359add14c
downloadaur-314bb298c31b481cafd89ebe6529d3ca094f1b61.tar.gz
Initial commit
There will be many others But this one is first
-rw-r--r--.SRCINFO18
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD46
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f8f79e30578
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = gws2-git
+ pkgdesc = Colorful KISS helper for git workspaces
+ pkgver = 0.1.0.r2.g3c97a0e
+ pkgrel = 1
+ url = https://github.com/emlun/gws2
+ arch = any
+ license = GPL3
+ makedepends = rust
+ makedepends = cargo
+ depends = git
+ provides = gws
+ conflicts = gws
+ source = gws2::git+https://github.com/emlun/gws2.git#branch=tmp
+ validpgpkeys = BFD86BE9948C849A
+ md5sums = SKIP
+
+pkgname = gws2-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..3efccd3ec7d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.pkg.tar.xz
+*.pkg.tar.xz.sig
+/gws2/
+/pkg/
+/src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f3597ea4f17
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Emil Lundberg <emil@emlun.se>
+
+pkgname="gws2-git"
+_reponame="gws2"
+_binname="gws"
+pkgver=0.1.0.r2.g3c97a0e
+pkgrel=1
+pkgdesc="Colorful KISS helper for git workspaces"
+url="https://github.com/emlun/${_reponame}"
+license=('GPL3')
+arch=('any')
+depends=('git')
+makedepends=('rust' 'cargo')
+provides=("gws")
+conflicts=("gws")
+source=("${_reponame}::git+https://github.com/emlun/${_reponame}.git#branch=tmp")
+md5sums=('SKIP')
+validpgpkeys=('BFD86BE9948C849A')
+
+prepare() {
+ git -C "${srcdir}/${_reponame}" verify-commit HEAD --raw |& grep -q "GOODSIG ${validpgpkeys[0]}" \
+ || (echo 'Failed to verify commit signature' >&2; return 1)
+
+ git -C "${srcdir}/${_reponame}" submodule update --recursive --init
+}
+
+pkgver() {
+ cd "${srcdir}/${_reponame}/"
+ git describe --long --tags --always | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "${srcdir}/${_reponame}"
+ cargo build --release
+ mkdir -p "${srcdir}/completions"
+ for shell in bash fish zsh; do
+ "${srcdir}/${_reponame}/target/release/${_binname}" completions "${shell}" > "${srcdir}/completions/${shell}"
+ done
+}
+
+package() {
+ install -D -m 755 "${srcdir}/${_reponame}/target/release/${_binname}" "${pkgdir}/usr/bin/${_binname}"
+ install -D -m 755 "${srcdir}/completions/bash" "${pkgdir}/usr/share/bash-completion/completions/${_binname}"
+ install -D -m 755 "${srcdir}/completions/fish" "${pkgdir}/usr/share/fish/completions/${_binname}.fish"
+ install -D -m 755 "${srcdir}/completions/zsh" "${pkgdir}/usr/share/zsh/site-functions/_${_binname}"
+}