From 05d004dfe0c9a9d898fac8a4a0292ca2a74ca391 Mon Sep 17 00:00:00 2001 From: davidovski Date: Mon, 19 Dec 2022 23:07:05 +0000 Subject: Making things work --- repo/libbpf/libbpf.xibuild | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 repo/libbpf/libbpf.xibuild (limited to 'repo/libbpf/libbpf.xibuild') diff --git a/repo/libbpf/libbpf.xibuild b/repo/libbpf/libbpf.xibuild new file mode 100644 index 0000000..0e4993d --- /dev/null +++ b/repo/libbpf/libbpf.xibuild @@ -0,0 +1,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.0.1 +SOURCE="https://github.com/libbpf/libbpf/archive/refs/tags/v$PKG_VER.tar.gz" + +ADDITIONAL=" +10-consolidate-lib-dirs.patch +" + +build() { + cd src + make NO_PKG_CONFIG=1 +} + +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 +} + -- cgit v1.2.1