xref: /OK3568_Linux_fs/buildroot/package/sysdig/sysdig.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# sysdig
4#
5################################################################################
6
7SYSDIG_VERSION = 0.23.1
8SYSDIG_SITE = $(call github,draios,sysdig,$(SYSDIG_VERSION))
9SYSDIG_LICENSE = GPL-2.0
10SYSDIG_LICENSE_FILES = COPYING
11SYSDIG_CPE_ID_VENDOR = sysdig
12SYSDIG_CONF_OPTS = -DENABLE_DKMS=OFF -DUSE_BUNDLED_DEPS=OFF
13SYSDIG_SUPPORTS_IN_SOURCE_BUILD = NO
14
15SYSDIG_DEPENDENCIES = \
16	elfutils \
17	jq \
18	jsoncpp \
19	libb64 \
20	libcurl \
21	luainterpreter \
22	ncurses \
23	openssl \
24	zlib
25
26# sysdig creates the module Makefile from a template, which contains a
27# single place-holder, KBUILD_FLAGS, wich is only replaced with two
28# things:
29#   - debug flags, which we don't care about here,
30#   - 'sysdig-feature' flags, which are never set, so always empty
31# So, just replace the place-holder with the only meaningful value: nothing.
32define SYSDIG_MODULE_GEN_MAKEFILE
33	$(INSTALL) -m 0644 $(@D)/driver/Makefile.in $(@D)/driver/Makefile
34	$(SED) 's/@KBUILD_FLAGS@//;' $(@D)/driver/Makefile
35	$(SED) 's/@PROBE_NAME@/sysdig-probe/;' $(@D)/driver/Makefile
36endef
37SYSDIG_POST_PATCH_HOOKS += SYSDIG_MODULE_GEN_MAKEFILE
38
39# Don't build the driver as part of the 'standard' procedure, we'll
40# build it on our own with the kernel-module infra.
41SYSDIG_CONF_OPTS += -DBUILD_DRIVER=OFF
42
43SYSDIG_MODULE_SUBDIRS = driver
44SYSDIG_MODULE_MAKE_OPTS = KERNELDIR=$(LINUX_DIR)
45
46$(eval $(kernel-module))
47$(eval $(cmake-package))
48