aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-kernel/libbpf/libbpf_0.4.bb
blob: 27df98c3e7c60b00a8e1409a0f71bd409d88f2cb (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
34
35
36
37
38
39
40
41
42
43
SUMMARY = "Library for BPF handling"
DESCRIPTION = "Library for BPF handling"
HOMEPAGE = "https://github.com/libbpf/libbpf"
SECTION = "libs"
LICENSE = "LGPLv2.1+"

# There is a typo in the filename, LPGL should really be LGPL.
# Keep this until the correct name is set upstream.
LIC_FILES_CHKSUM = "file://../LICENSE.LGPL-2.1;md5=b370887980db5dd40659b50909238dbd"

DEPENDS = "zlib elfutils"

do_compile[depends] += "virtual/kernel:do_shared_workdir"

SRC_URI = "git://github.com/libbpf/libbpf.git;protocol=https"
SRCREV = "db9614b6bd69746809d506c2786f914b0f812c37"

PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64).*-linux"

S = "${WORKDIR}/git/src"

EXTRA_OEMAKE += "DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir}"

inherit pkgconfig

do_compile() {
	if grep -q "CONFIG_BPF_SYSCALL=y" ${STAGING_KERNEL_BUILDDIR}/.config
	then
		oe_runmake
	else
		bbnote "BFP syscall is not enabled"
	fi
}

do_install() {
	if grep -q "CONFIG_BPF_SYSCALL=y" ${STAGING_KERNEL_BUILDDIR}/.config
	then
		oe_runmake install
	else
		bbnote "no files to install"
	fi
}