summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 714f59cc91a476a3c6c271790938788dad7c1774 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Maintainer: Andrey Burov <burik666@gmail.com>

pkgname=yagostatus-git
pkgver=v0.4.0.r1.g32dbd57
pkgrel=1
pkgdesc='Yet Another i3status replacement written in Go.'
arch=('x86_64' 'i686')
url='https://github.com/burik666/yagostatus'
license=('GPL3')
makedepends=('go' 'git')
options=('!strip' '!emptydirs')
source=('git+https://github.com/burik666/yagostatus.git')
md5sums=('SKIP')
_gourl='github.com/burik666/yagostatus'

pkgver() {
    cd "$srcdir/yagostatus"
    git describe --tags --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    GOPATH="$srcdir" go get -v "$_gourl"
}

package() {
    _gitdir="$srcdir/src/$_gourl"

    install -p -m 755 -D -t "$pkgdir/usr/bin/" "$srcdir/bin/yagostatus"
    install -m 644 -D -t "$pkgdir/usr/share/$pkgname/" "$_gitdir/README.md"
    install -m 644 -D -t "$pkgdir/usr/share/$pkgname/" "$_gitdir/yagostatus.yml"
}