summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7b881e4508a01ce08f3c111061910edb4049f515 (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
43
44
45
46
47
# Maintainer: aksr <aksr at t-com dot me>
pkgname=nex-git
pkgver=r112.542279e
pkgrel=1
epoch=
pkgdesc="A lexer similar to Lex/Flex, generates Go code, integrates with Go's yacc, supports UTF-8 and nested structural regular expressions."
arch=('i686' 'x86_64')
url="https://github.com/blynn/nex"
license=('GPLv3')
categories=()
groups=()
depends=('')
makedepends=('git' 'go')
optdepends=()
checkdepends=()
provides=()
conflicts=('')
replaces=()
backup=()
options=()
changelog=
install=
noextract=()
_gourl=github.com/blynn/nex

pkgver() {
  GOPATH="$srcdir" go get -d ${_gourl}
  cd "$srcdir/src/${_gourl}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

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

check() {
  cd "$srcdir/src/${_gourl}"
  #make test
}

package() {
  cd "$srcdir"
  install -Dm755 bin/nex "$pkgdir/usr/bin/nex"
  install -Dm644 src/${_gourl}/README.asciidoc $pkgdir/usr/share/doc/${pkgname%-*}/README.asciidoc
  install -Dm644 src/${_gourl}/COPYING $pkgdir/usr/share/licenses/${pkgname%-*}/COPYING
}