summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fe9413ee0cbda63829e393d72ee38d086f9ebb29 (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
# Maintainer: Eshin Kunishima <ek at esh dot ink>
pkgname=cpustat
pkgver=1.1.0
pkgrel=1
pkgdesc="High Frequency Performance Measurements for Linux"
arch=('x86_64' 'i686')
url="https://github.com/uber-common/cpustat"
license=('MIT')
depends=('glibc')
makedepends=('go')
options=('!strip' '!emptydirs')
source=("$pkgname-$pkgver.tar.gz::https://codeload.github.com/uber-common/cpustat/tar.gz/$pkgver")
sha256sums=('c3fc86c206ab4d6b2274d888638e59a05d4ef9bd7817581c781368d13f7440cc')

prepare() {
  cd "$pkgname-$pkgver"

  GOPATH="$srcdir" go get -v -x -d
}

build() {
  cd "$pkgname-$pkgver"

  GOPATH="$srcdir" go build -v -x
}

package() {
  cd "$pkgname-$pkgver"
  
  install -Dm755 "$pkgname-$pkgver" "$pkgdir/usr/bin/$pkgname"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}