Andrew Geissler | 97771a3 | 2021-03-05 15:23:11 -0600 | [diff] [blame] | 1 | SUMMARY = "Library for BPF handling" |
| 2 | DESCRIPTION = "Library for BPF handling" |
| 3 | HOMEPAGE = "https://github.com/libbpf/libbpf" |
| 4 | SECTION = "libs" |
| 5 | LICENSE = "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. |
| 9 | LIC_FILES_CHKSUM = "file://../LICENSE.LPGL-2.1;md5=b370887980db5dd40659b50909238dbd" |
| 10 | |
| 11 | DEPENDS = "zlib elfutils" |
| 12 | |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame^] | 13 | do_compile[depends] += "virtual/kernel:do_shared_workdir" |
| 14 | |
Andrew Geissler | 97771a3 | 2021-03-05 15:23:11 -0600 | [diff] [blame] | 15 | SRC_URI = "git://github.com/libbpf/libbpf.git;protocol=https" |
| 16 | SRCREV = "051a4009f94d5633a8f734ca4235f0a78ee90469" |
| 17 | |
| 18 | # Backported from version 0.4 |
| 19 | SRC_URI += "file://0001-install-don-t-preserve-file-owner.patch" |
| 20 | |
| 21 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 22 | COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64).*-linux" |
| 23 | |
| 24 | S = "${WORKDIR}/git/src" |
| 25 | |
| 26 | EXTRA_OEMAKE += "DESTDIR=${D} LIBDIR=${libdir}" |
| 27 | |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame^] | 28 | inherit pkgconfig |
| 29 | |
Andrew Geissler | 97771a3 | 2021-03-05 15:23:11 -0600 | [diff] [blame] | 30 | do_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 | |
| 39 | do_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 | } |