aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/lttng/ust.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/lttng/ust.inc')
-rw-r--r--recipes/lttng/ust.inc40
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes/lttng/ust.inc b/recipes/lttng/ust.inc
new file mode 100644
index 0000000000..26e4d4292b
--- /dev/null
+++ b/recipes/lttng/ust.inc
@@ -0,0 +1,40 @@
+DESCRIPTION = "LTTng Userspace Tracer (UST)"
+SECTION = "devel"
+PRIORITY = "optional"
+LICENSE = "GPLv2 and LGPLv2.1"
+DEPENDS = "liburcu"
+
+PR = "r3"
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "ustd"
+INITSCRIPT_PARAMS = "defaults 99 0"
+
+UST_BASEDIR = "/tmp/ust"
+
+SRC_URI = "http://lttng.org/files/ust/releases/ust-${PV}.tar.gz \
+ file://ustd.init"
+
+S = "${WORKDIR}/ust-${PV}"
+
+inherit autotools
+
+do_compile_append () {
+ sed -e 's|^#!/bin/bash$|#!/bin/sh|' \
+ -e 's/^function \(.*() *{\)$/\1/' \
+ -e 's|^\(BASE_TRACE_DIR\)=.*|\1="${UST_BASEDIR}"|' \
+ -e 's/\(.*\)="$(<\(.*\))"/\1=`cat \2`/' \
+ -e 's/^\(DATESTRING\)=.*/\1="$(date +%Y%m%d%H%M%S)"/' \
+ -i ${S}/usttrace
+ sed -e 's|^\(TRACEDIR\)=.*|\1="${UST_BASEDIR}"|' \
+ -i ${WORKDIR}/ustd.init
+}
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/ustd.init ${D}${sysconfdir}/init.d/ustd
+}
+
+# Need the .so symlinks for preload to work
+FILES_${PN} += "${libdir}/libust*.so"