blob: 57e8376b5e530be204324c560953025aff650092 [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
Andrew Geissler32b11992021-03-31 13:37:05 -050013do_compile[depends] += "virtual/kernel:do_shared_workdir"
14
Andrew Geissler97771a32021-03-05 15:23:11 -060015SRC_URI = "git://github.com/libbpf/libbpf.git;protocol=https"
16SRCREV = "051a4009f94d5633a8f734ca4235f0a78ee90469"
17
18# Backported from version 0.4
19SRC_URI += "file://0001-install-don-t-preserve-file-owner.patch"
20
21PACKAGE_ARCH = "${MACHINE_ARCH}"
22COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64).*-linux"
23
24S = "${WORKDIR}/git/src"
25
26EXTRA_OEMAKE += "DESTDIR=${D} LIBDIR=${libdir}"
27
Andrew Geissler32b11992021-03-31 13:37:05 -050028inherit pkgconfig
29
Andrew Geissler97771a32021-03-05 15:23:11 -060030do_compile() {
31 if grep -q "CONFIG_BPF_SYSCALL=y" ${STAGING_KERNEL_BUILDDIR}/.config
32 then
33 oe_runmake
34 else
35 bbnote "BFP syscall is not enabled"
36 fi
37}
38
39do_install() {
40 if grep -q "CONFIG_BPF_SYSCALL=y" ${STAGING_KERNEL_BUILDDIR}/.config
41 then
42 oe_runmake install
43 else
44 bbnote "no files to install"
45 fi
46}