summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 385775bff0c58a1e547b393df10449fdb6b050ac (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
# Maintainer: Tommaso Sardelli <lacapannadelloziotom at gmail dot com>
pkgname=bpftrace-git
_pkgname=bpftrace
pkgver=r2483.d3ca1611
pkgrel=1
pkgdesc='High-level tracing language for Linux eBPF'
arch=('i686' 'x86_64')
url="https://github.com/iovisor/bpftrace"
license=('Apache')
depends=('libelf' 'zlib' 'llvm-libs' 'clang' 'bcc' 'libbpf')
makedepends=('cmake' 'git' 'llvm' 'cereal' 'asciidoctor')
conflicts=('bpftrace')
provides=('bpftrace')
source=("git+https://github.com/iovisor/bpftrace.git")
sha512sums=('SKIP')
options=('!strip')

pkgver() {
  cd "$srcdir/$_pkgname"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  cd "$srcdir/$_pkgname"

  mkdir -p build
  cd build
  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
  make
}

package() {
  cd "$srcdir/$_pkgname/build"

  make DESTDIR="$pkgdir/" install

}

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