summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f09c71afd2580efcf3b0a063e2a7eb9f5899136a (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
# Maintainer: Jonathan Wright <jon@than.io>

pkgname=go-bindata-git
pkgver=4.0.2.r0.g2394b82
pkgrel=1
pkgdesc="Converts any file into managable Go source code - git checkout"
arch=(x86_64)
url="https://github.com/kevinburke/go-bindata/"
license=(CC0-1.0)

source=("git+https://github.com/kevinburke/go-bindata.git")
sha256sums=('SKIP')

makedepends=(git go)
provides=(go-bindata)
conflicts=(go-bindata)
options=('!strip')

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

build() {
  export GOPATH=$srcdir/gopath
  rm -rf $srcdir/gopath
  mkdir -p "$srcdir/gopath/src/github.com/kevinburke"
  export GO111MODULE=auto
  ln -s $srcdir/go-bindata $GOPATH/src/github.com/kevinburke/go-bindata
  cd $GOPATH/src/github.com/kevinburke/go-bindata

  go build -v -o .bin ./go-bindata
}

package() {
  mkdir -p $pkgdir/usr/bin
  install -Dm755 "$srcdir/gopath/src/github.com/kevinburke/go-bindata/.bin" $pkgdir/usr/bin/go-bindata
}