blob: cea71db02ebf6ead15e031353ac8c2de44ac6350 (
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
|
# Maintainer: Adam Jensen <acjensen@gmail.com>
pkgname=libbpf
pkgver=1.1.0
pkgrel=1
pkgdesc="A library for interacting with the Linux kernel's Berkeley Packet Filter (BPF) facility from user space"
url="https://github.com/libbpf/libbpf"
arch="all"
license="LGPL-2.1-only OR BSD-2-Clause"
depends="elfutils"
makedepends="build-base linux-headers elfutils-dev zlib-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/libbpf/libbpf/archive/refs/tags/v$pkgver.tar.gz
10-consolidate-lib-dirs.patch"
build() {
cd src
make NO_PKG_CONFIG=1
}
check() {
echo "#include \"$builddir/src/btf.h\"" | gcc -xc -c -o /dev/null -
}
package() {
cd src
make install DESTDIR="$pkgdir"
# install somewhere out of the way that will hopefully not be included by mistake
mkdir -p "$pkgdir/usr/include/bpf/uapi/linux"
for header in bpf.h bpf_common.h btf.h; do
cp "$builddir/include/uapi/linux/$header" "$pkgdir/usr/include/bpf/uapi/linux/"
done
}
sha512sums="
751126893883c68e5472724988327e03f7f52becd472f7d6239fa838762f857e54a0347f8f824b8c32ca93b8f419310a86e1d75e3646dae72c2d2992d093b828 libbpf-1.1.0.tar.gz
a374386f8b361b60c70d566aebb11b87a23bc43d8cfa02cce9997961139f89caf691d826020c4b08159e815c14d87cc907f2cc6e784329d0288d18d2b609fefd 10-consolidate-lib-dirs.patch
"
|