blob: 5714ddb6125455fa142d90dc49d0c669d9dab542 [file] [log] [blame]
Andrew Geissler97771a32021-03-05 15:23:11 -06001SUMMARY = "Library for BPF handling"
2DESCRIPTION = "Library for BPF handling"
3HOMEPAGE = "https://github.com/libbpf/libbpf"
4SECTION = "libs"
5LICENSE = "LGPLv2.1+"
6
7# There is a typo in the filename, LPGL should really be LGPL.
8# Keep this until the correct name is set upstream.
9LIC_FILES_CHKSUM = "file://../LICENSE.LPGL-2.1;md5=b370887980db5dd40659b50909238dbd"
10
11DEPENDS = "zlib elfutils"
12
13SRC_URI = "git://github.com/libbpf/libbpf.git;protocol=https"
14SRCREV = "051a4009f94d5633a8f734ca4235f0a78ee90469"
15
16# Backported from version 0.4
17SRC_URI += "file://0001-install-don-t-preserve-file-owner.patch"
18
19PACKAGE_ARCH = "${MACHINE_ARCH}"
20COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64).*-linux"
21
22S = "${WORKDIR}/git/src"
23
24EXTRA_OEMAKE += "DESTDIR=${D} LIBDIR=${libdir}"
25
26do_compile() {
27 if grep -q "CONFIG_BPF_SYSCALL=y" ${STAGING_KERNEL_BUILDDIR}/.config
28 then
29 oe_runmake
30 else
31 bbnote "BFP syscall is not enabled"
32 fi
33}
34
35do_install() {
36 if grep -q "CONFIG_BPF_SYSCALL=y" ${STAGING_KERNEL_BUILDDIR}/.config
37 then
38 oe_runmake install
39 else
40 bbnote "no files to install"
41 fi
42}
43
44BBCLASSEXTEND = "native"