summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 23da3c1eebb7d55981b71889f4f0502b217a585d (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
# Maintainer: 0x9fff00 <0x9fff00+git@protonmail.ch>

pkgname=golang-github-gorilla-websocket
pkgver=1.4.2
pkgrel=1
pkgdesc='A fast, well-tested and widely used WebSocket implementation for Go'
arch=('any')
url="https://github.com/gorilla/websocket"
license=('BSD')
depends=('go')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('91937a36bc9e0da3c895c73d4cb74b2cdb1aff54ab21b0d0724000e7b5b85b84')

check() {
  export GOPATH="$srcdir/gopath:/usr/share/gocode"
  mkdir -p gopath/src/github.com/gorilla
  cp -a websocket-$pkgver gopath/src/github.com/gorilla/websocket
  cd gopath/src/github.com/gorilla/websocket
  go test -v $(go list ./...)
}

package() {
  mkdir -p "$pkgdir/usr/share/gocode/src/github.com/gorilla"
  cp -a websocket-$pkgver "$pkgdir/usr/share/gocode/src/github.com/gorilla/websocket"

  install -Dm644 websocket-$pkgver/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}