summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a30d4c3843f122093b64c636afe7517d2afa23bd (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
# Maintainer: GI_Jack <GI_Jack@hackermail.com>

pkgname=uroboros-mon-git
_pkgname=uroboros
pkgver=r45.13993dd
pkgrel=1
pkgdesc="A GNU/Linux (resource) monitoring tool focused on single processes."
arch=('x86_64')
url="https://github.com/evilsocket/uroboros"
license=('GPL')
makedepends=('git' 'go') # 'bzr', 'git', 'mercurial' or 'subversion'
provides=("uroboros-mon")
conflicts=("uroboros-mon")
source=("${_pkgname}::git+https://github.com/evilsocket/uroboros.git")
sha256sums=('SKIP')

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

prepare() {
  cd "${_pkgname}"
  make clean
}

build() {
  cd "$srcdir/${_pkgname}"
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"
  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
  make all
}

check() {
  cd "$srcdir/${_pkgname}"
  make test-process
}

package() {
  cd "$srcdir/${_pkgname}"
  install -Dm755 _build/uro "${pkgdir}/usr/bin/uro"
}