summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dbb631fd95b277161d0d314c6d82dfec8de5bbed (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
# Maintainer: Alexander Rødseth <rodseth@gmail.com>

pkgname=godit
pkgver=20130106
pkgrel=1
pkgdesc='Emacs-like editor written in Go'
arch=('x86_64' 'i686')
url='https://github.com/nsf/godit'
license=('MIT')
makedepends=('go' 'go-check' 'go-termbox>=1-3')
options=('!strip' '!emptydirs')
_gourl=github.com/nsf/godit

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

check() {
  source /etc/profile.d/go.sh
  GOPATH="$GOPATH:$srcdir" go test -v -x ${_gourl}
}

package() {
  # Package license (if available)
  for f in LICENSE COPYING; do
    if [ -e "$srcdir/src/$_gourl/$f" ]; then
      install -Dm644 "$srcdir/src/$_gourl/$f" \
        "$pkgdir/usr/share/licenses/$pkgname/$f"
    fi
  done
  install -Dm755 "$srcdir/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
}

# vim:set ts=2 sw=2 et: