summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ec6a30cb1dc6b6e0455fb426e52d3fb988a3ad5b (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: Kirill Fries-Raevskiy <exocarnivore@gmail.com>
_pkgbase="bpftune"
pkgname="$_pkgbase-git"
pkgver=r598.688b122
pkgrel=1
pkgdesc="BPF/tracing tools for auto-tuning Linux"
arch=("x86_64")
url="https://github.com/oracle/bpftune"
license=('GPLv2 WITH Linux-syscall-note')
#groups=()
depends=("libbpf" "libnl" "libcap")
makedepends=('git' 'bpf' 'clang' 'llvm' 'llvm-libs' 'python-docutils')
provides=("$_pkgbase")
conflicts=("$_pkgbase")
#replaces=()
#backup=()
options=('strip')
#install=
source=('git+https://github.com/oracle-samples/bpftune')
#noextract=()
md5sums=('SKIP')

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

prepare() {
	cd "$srcdir/$_pkgbase"
	sed -i 's/\/sbin/\/bin/g' src/Makefile
	sed -i 's/\/sbin/\/bin/g' src/bpftune.service
}

build() {
	cd "$srcdir/$_pkgbase"
	CC=clang make libdir=lib
}

package() {
	cd "$srcdir/$_pkgbase"
	CC=clang make DESTDIR="$pkgdir" libdir=lib install
}