1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 : ${CMAKE_MAKEFILE_GENERATOR:=ninja}
7 MODULES_OPTIONAL_USE=modules
8 inherit linux-mod bash-completion-r1 cmake-utils
10 DESCRIPTION="A system exploration and troubleshooting tool"
11 HOMEPAGE="http://www.sysdig.org/"
12 SRC_URI="https://github.com/draios/sysdig/archive/${PV}.tar.gz -> ${P}.tar.gz"
16 KEYWORDS="~amd64 ~x86"
22 >=dev-libs/jsoncpp-0.6_pre:0=
32 # needed for the kernel module
33 CONFIG_CHECK="HAVE_SYSCALL_TRACEPOINTS ~TRACEPOINTS"
44 sed -i -e 's:-ggdb::' CMakeLists.txt || die
46 cmake-utils_src_prepare
51 # we will use linux-mod for that
53 # libscap examples are not installed or really useful
54 -DBUILD_LIBSCAP_EXAMPLES=OFF
57 -DUSE_BUNDLED_DEPS=OFF
60 cmake-utils_src_configure
62 # setup linux-mod ugliness
63 MODULE_NAMES="sysdig-probe(extra:${S}/driver:)"
64 BUILD_PARAMS='KERNELDIR="${KERNEL_DIR}"'
68 cmake-utils_src_make configure_driver
70 cp "${BUILD_DIR}"/driver/Makefile.dkms driver/Makefile || die
75 cmake-utils_src_compile
81 cmake-utils_src_install
86 rm -r "${ED%/}"/usr/src || die
88 # move bashcomp to the proper location
89 dobashcomp "${ED%/}"/usr/etc/bash_completion.d/sysdig || die
90 rm -r "${ED%/}"/usr/etc || die