summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Scholberg2016-11-05 18:20:15 -0400
committerDavid Scholberg2016-11-05 18:20:15 -0400
commit4021512a8d3272912da226f0c51c1c862392ba42 (patch)
tree5b058238c0bb5dcb37f95a54e52577be189e5ee6
downloadaur-4021512a8d3272912da226f0c51c1c862392ba42.tar.gz
initial commit
-rw-r--r--.SRCINFO18
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD40
-rw-r--r--goblocks.install21
4 files changed, 83 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a3ae00614a6c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = goblocks
+ pkgdesc = Fast, lightweight i3status replacement written in Go
+ pkgver = 1.0.0
+ pkgrel = 1
+ url = https://github.com/davidscholberg/goblocks
+ install = goblocks.install
+ arch = x86_64
+ arch = i686
+ license = custom:BSD
+ makedepends = git
+ makedepends = go>=1.7.0
+ optdepends = alsa-utils: volume status support
+ optdepends = zfs-utils: zfs status support
+ provides = goblocks
+ conflicts = goblocks
+
+pkgname = goblocks
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..cc1a3f2994ef
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+.*.swp
+*.tar.xz
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7e7a6f8b8bf2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: David Scholberg <recombinant.vector@gmail.com>
+
+pkgname='goblocks'
+pkgver=1.0.0
+pkgrel=1
+pkgdesc='Fast, lightweight i3status replacement written in Go'
+arch=('x86_64'
+ 'i686')
+url='https://github.com/davidscholberg/goblocks'
+license=('custom:BSD')
+install='goblocks.install'
+makedepends=('git'
+ 'go>=1.7.0')
+optdepends=('alsa-utils: volume status support'
+ 'zfs-utils: zfs status support')
+provides=('goblocks')
+conflicts=('goblocks')
+
+_gopgkname='github.com/davidscholberg/goblocks'
+_giturl="https://$_gopgkname.git"
+
+prepare() {
+ rm -rf "$srcdir"/{bin,pkg,src}
+ git clone --branch "$pkgver" --depth 1 "$_giturl" "$srcdir/src/$_gopgkname"
+}
+
+build() {
+ GOPATH="$srcdir" go get -v "$_gopgkname"
+}
+
+package() {
+ _gitdir="$srcdir/src/$_gopgkname"
+
+ install -p -m 755 -D -t "$pkgdir/usr/bin/" "$srcdir/bin/goblocks"
+ install -m 644 -D -t "$pkgdir/usr/share/$pkgname/" "$_gitdir/README.md"
+ install -m 644 -D -t "$pkgdir/usr/share/$pkgname/config/" \
+ "$_gitdir/config/goblocks-full.yml"
+ install -m 644 -D -t "$pkgdir/usr/share/licenses/$pkgname/" \
+ "$_gitdir/LICENSE"
+}
diff --git a/goblocks.install b/goblocks.install
new file mode 100644
index 000000000000..1c85526409a8
--- /dev/null
+++ b/goblocks.install
@@ -0,0 +1,21 @@
+# arg 1: the new package version
+post_install() {
+ cat <<'EOF'
+==> Goblocks requires a configuration file to be located at
+==> $HOME/.config/goblocks/goblocks.yml. There is a full configuration example
+==> located at /usr/share/goblocks/config/goblocks-full.yml, which you may copy
+==> and modify to your needs.
+==>
+==> For more info about Goblocks, see the locally installed README or the
+==> Goblocks website:
+==>
+==> * /usr/share/goblocks/README.md
+==> * https://github.com/davidscholberg/goblocks
+EOF
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install
+}