summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: abe606fef4df7db6da67224c4b6304409b023067 (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
48
# Maintainer: Mittens <mittens2001@opmbx.org>

pkgname=speakerbot-git
_pkgname=speakerbot
pkgver=r17.51b0836
pkgrel=1
pkgdesc="Multiserver music bot for Discord written in Go"
arch=('x86_64' 'i686')
url="https://github.com/dustinblackman/speakerbot"
license=('MIT')
depends=('ffmpeg' 'opus-tools')
makedepends=('glide' 'go' 'git')
options=('!strip' '!emptydirs')
source=('git+https://github.com/dustinblackman/speakerbot')
md5sums=('SKIP')

_url=github.com/dustinblackman/$_pkgname

pkgver() {
  cd "$srcdir/../$_pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  export GOPATH="$srcdir"
  mkdir -p "$GOPATH/src/$_url"
  mv "$srcdir/$_pkgname" "$GOPATH/src/$_url/.."

  msg2 "Building package dependencies..."
  cd "$GOPATH/src/$_url"
  glide install
}

build() {
  export GOPATH="$srcdir"
  cd "$GOPATH/src/$_url"
  make
}
 

package() {
  cd "$srcdir/src/$_url"

  install -Dm755 "$_pkgname" "$pkgdir/usr/bin/$_pkgname"
  install -Dm644 LICENSE "$pkgdir/usr/share/license/$_pkgname/LICENSE"
}

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