1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 # cmake generates make-specific code
8 #: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
9 inherit linux-mod bash-completion-r1 cmake-utils
11 DESCRIPTION="A system exploration and troubleshooting tool"
12 HOMEPAGE="http://www.sysdig.org/"
13 SRC_URI="https://github.com/draios/sysdig/archive/${PV}.tar.gz -> ${P}.tar.gz"
17 KEYWORDS="~amd64 ~x86"
22 >=dev-libs/jsoncpp-0.6_pre:0=
32 # needed for the kernel module
33 CONFIG_CHECK="HAVE_SYSCALL_TRACEPOINTS ~TRACEPOINTS"
36 use modules && linux-mod_pkg_setup
40 use modules && linux-mod_pkg_setup
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:${BUILD_DIR}/driver:)"
64 BUILD_PARAMS='KERNELDIR="${KERNEL_DIR}"'
65 BUILD_TARGETS="driver"
69 cmake-utils_src_compile
71 use modules && linux-mod_src_compile
75 cmake-utils_src_install
77 use modules && linux-mod_src_install
80 rm -r "${ED%/}"/usr/src || die
82 # move bashcomp to the proper location
83 dobashcomp "${ED%/}"/usr/etc/bash_completion.d/sysdig || die
84 rm -r "${ED%/}"/usr/etc || die