blob: 93ddac9fe2e72cb681a04142fce71b632235dd90 (
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
|
#!/bin/sh
NAME="libbpf"
DESC="A library for interacting with the Linux kernel's Berkeley Packet Filter (BPF) facility from user space"
MAKEDEPS="linux-headers elfutils zlib"
PKG_VER=1.1.0
SOURCE="https://github.com/libbpf/libbpf/archive/refs/tags/v$PKG_VER.tar.gz"
ADDITIONAL="
10-consolidate-lib-dirs.patch
"
build() {
cd src
make
}
check() {
echo "#include \"$BUILD_ROOT/src/btf.h\"" | gcc -xc -c -o /dev/null -
}
package() {
cd src
make install DESTDIR="$PKG_DEST"
# install somewhere out of the way that will hopefully not be included by mistake
mkdir -p "$PKG_DEST/usr/include/bpf/uapi/linux"
for header in bpf.h bpf_common.h btf.h; do
cp "$BUILD_ROOT/include/uapi/linux/$header" "$PKG_DEST/usr/include/bpf/uapi/linux/"
done
}
|