aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-benchmark
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2013-07-04 12:48:55 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2013-07-08 10:35:58 +0200
commita0726a33b3f9eac73ecd63314866fae7d956094a (patch)
tree1a378d50e4c35e0a393bacc8e9c2014c17131f3c /meta-oe/recipes-benchmark
parent77bc54f180eed8ce1ec2712e3c6aa00b2c7ac1b4 (diff)
downloadmeta-openembedded-contrib-a0726a33b3f9eac73ecd63314866fae7d956094a.tar.gz
lmbench: remove /run/lmbench from package
Create /run/lmbench on startup using populate-volatiles.sh and tmpfiles.d for systemd. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-benchmark')
-rw-r--r--meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb21
1 files changed, 20 insertions, 1 deletions
diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
index 31a1109045..d42d62c900 100644
--- a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
+++ b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
@@ -37,9 +37,18 @@ do_compile () {
}
do_install () {
- install -d ${D}${localstatedir}/run/lmbench \
+ install -d ${D}${sysconfdir}/default/volatiles \
${D}${bindir} ${D}${mandir} ${D}${libdir}/lmbench \
${D}${datadir}/lmbench/scripts
+
+ echo "d root root 0755 ${localstatedir}/run/${BPN} none" \
+ > ${D}${sysconfdir}/default/volatiles/99_lmbench
+ if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d /run/${BPN} - - - -" \
+ > ${D}${sysconfdir}/tmpfiles.d/lmbench.conf
+ fi
+
oe_runmake 'BASE=${D}${prefix}' \
-C src install
mv ${D}${bindir}/line ${D}${bindir}/lm_line
@@ -52,5 +61,15 @@ do_install () {
install -m 0755 ${S}/scripts/* ${D}${datadir}/lmbench/scripts
}
+pkg_postinst_${PN} () {
+ if [ -z "$D" ]; then
+ if command -v systemd-tmpfiles >/dev/null; then
+ systemd-tmpfiles --create
+ elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
+ ${sysconfdir}/init.d/populate-volatile.sh update
+ fi
+ fi
+}
+
RDEPENDS_${PN} = "debianutils"
FILES_${PN} += "${datadir}/lmbench ${libdir}/lmbench"