summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 08e429b4a8593c8ca6b6bc8e2f698d1735732d02 (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
# Maintainer: Tyler Brock <tyler.brock@gmail.com>
pkgname=saw
pkgver=0.2.2
pkgrel=1
pkgdesc="Fast, multipurpose tool for AWS CloudWatch Logs"
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
provides=('saw')
url="https://github.com/TylerBrock/$pkgname"
license=('MIT')
makedepends=('go' 'git' 'dep')
source=("https://github.com/TylerBrock/$pkgname/archive/v$pkgver.tar.gz")
md5sums=('94cea15afeaddb185c8b5bb41c7cbf68')

prepare() {
  mkdir -p "${srcdir}/go/src/github.com/TylerBrock/"
  mv "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/go/src/github.com/TylerBrock/${pkgname}"
}

build() {
  export GOPATH="${srcdir}/go"
  export PATH="$PATH:$srcdir/go/bin"
  cd "${srcdir}/go/src/github.com/TylerBrock/${pkgname}"
  dep ensure
  go build .
}

package() {
  cd "${srcdir}/go/src/github.com/TylerBrock/${pkgname}"
  install -Dm755 saw "${pkgdir}/usr/bin/${pkgname}"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}