blob: 1c9f2aed16c97a2495d538ebbe58809cf661d110 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Linux"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002HOMEPAGE = "https://sourceware.org/systemtap/"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05003
4require systemtap_git.inc
5
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08006SRC_URI += "file://0001-improve-reproducibility-for-c-compiling.patch"
7
Brad Bishop316dfdd2018-06-25 12:45:53 -04008DEPENDS = "elfutils"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009
10EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \
11 --without-nss --without-avahi --without-dyninst \
12 --disable-server --disable-grapher --enable-prologues \
Brad Bishop37a0e4d2017-12-04 01:01:44 -050013 --with-python3 --without-python2-probes \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014 ac_cv_prog_have_javac=no \
15 ac_cv_prog_have_jar=no "
16
17STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs"
18
19EXTRA_OECONF += "${STAP_DOCS} "
20
Brad Bishop316dfdd2018-06-25 12:45:53 -040021PACKAGECONFIG ??= "translator sqlite monitor python3-probes"
22PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,python3-core bash perl"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060024PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
25PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
Brad Bishop37a0e4d2017-12-04 01:01:44 -050026PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080028inherit autotools gettext pkgconfig distutils3-base systemd
29
30PACKAGES =+ "${PN}-exporter"
31
32FILES_${PN}-exporter = "${sysconfdir}/stap-exporter/* \
33 ${sysconfdir}/sysconfig/stap-exporter \
34 ${systemd_unitdir}/system/stap-exporter.service \
35 ${sbindir}/stap-exporter"
36
37RDEPENDS_${PN}-exporter = "${PN} python3-core python3-netclient"
38
39SYSTEMD_SERVICE_${PN}-exporter = "stap-exporter.service"
40
41do_configure_prepend () {
42 # Improve reproducibility for c++ object files
43 reltivepath="${@os.path.relpath(d.getVar('STAGING_INCDIR'), d.getVar('S'))}"
44 sed -i "s:@RELATIVE_STAGING_INCDIR@:$reltivepath:g" ${S}/stringtable.h
45}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046
Brad Bishop316dfdd2018-06-25 12:45:53 -040047do_install_append () {
48 if [ ! -f ${D}${bindir}/stap ]; then
49 # translator disabled case, need to leave only minimal runtime
50 rm -rf ${D}${datadir}/${PN}
51 rm ${D}${libexecdir}/${PN}/stap-env
52 fi
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080053
Brad Bishop64c979e2019-11-04 13:55:29 -050054 if [ ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then
55 # Fix makefile hardcoded path assumptions for systemd (assumes $prefix)
56 # without usrmerge distro feature enabled
57 install -d `dirname ${D}${systemd_unitdir}`
58 mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
59 rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty
60 fi
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080061
62 # Ensure correct ownership for files copied in
63 chown root:root ${D}${sysconfdir}/stap-exporter/* -R
Brad Bishop316dfdd2018-06-25 12:45:53 -040064}
65
Brad Bishop6e60e8b2018-02-01 10:27:11 -050066BBCLASSEXTEND = "nativesdk"