summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d10dc7a3d8c35a277c35a941ba21bc88221be4cd (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
32
33
34
35
36
37
38
39
40
41
42
# Maintainer: John Jenkins <twodopeshaggy@gmail.com>

pkgname=wego-git
pkgver=r81.cd7c11a
pkgrel=1
pkgdesc="Weather app for your terminal."
arch=('any')
url="https://github.com/schachmat/wego"
license=('ISC')
makedepends=('go' 'git')
options=('!strip' '!emptydirs')
install=wego.install
source=($pkgname::git+https://github.com/schachmat/wego.git)
md5sums=('SKIP')
pkgver() {
  cd $srcdir/$pkgname
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    export GOPATH="$srcdir/$pkgname"
    go get github.com/mattn/go-colorable
    go get github.com/mattn/go-runewidth
    go get github.com/schachmat/wego/backends
    go get github.com/schachmat/ingo
}

build() {
    cd "$srcdir/$pkgname"
    msg2 'Building wego'
    go build -o wego main.go
}

package() {
  mkdir -p "$pkgdir/usr/bin"
  install -p -m755 $srcdir/$pkgname/wego "$pkgdir/usr/bin"
  
  cd "$srcdir/$pkgname"
  mkdir -p $pkgdir/usr/share/licenses/$pkgname
  install -m 0644 LICENSE $pkgdir/usr/share/licenses/$pkgname/

}