diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.5.0.bb')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.5.0.bb | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.5.0.bb b/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.5.0.bb index 585dc9481..ffafd17f8 100644 --- a/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.5.0.bb +++ b/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors_3.5.0.bb @@ -23,14 +23,26 @@ inherit update-rc.d systemd RDEPENDS_${PN}-dev = "" -INITSCRIPT_PACKAGES = "${PN}-fancontrol ${PN}-sensord" +PACKAGECONFIG ??= "sensord" +PACKAGECONFIG[sensord] = "sensord,,rrdtool" + +INITSCRIPT_PACKAGES = "\ + ${PN}-fancontrol \ + ${@bb.utils.contains('PACKAGECONFIG', 'sensord', '${PN}-sensord', '', d)} \ + " INITSCRIPT_NAME_${PN}-fancontrol = "fancontrol" INITSCRIPT_NAME_${PN}-sensord = "sensord" INITSCRIPT_PARAMS_${PN}-fancontrol = "defaults 66" INITSCRIPT_PARAMS_${PN}-sensord = "defaults 67" -SYSTEMD_PACKAGES = "${PN}-sensord" -SYSTEMD_SERVICE_${PN}-sensord = "sensord.service lm_sensors.service fancontrol.service" +SYSTEMD_PACKAGES = "\ + ${PN} \ + ${PN}-fancontrol \ + ${@bb.utils.contains('PACKAGECONFIG', 'sensord', '${PN}-sensord', '', d)} \ + " +SYSTEMD_SERVICE_${PN} = "lm_sensors.service" +SYSTEMD_SERVICE_${PN}-fancontrol = "fancontrol.service" +SYSTEMD_SERVICE_${PN}-sensord = "sensord.service" SYSTEMD_AUTO_ENABLE = "disable" S = "${WORKDIR}/git" @@ -46,13 +58,15 @@ do_compile() { sed -i -e 's/\$(LIBDIR)$/\$(LIBDIR) \$(LDFLAGS)/g' ${S}/Makefile sed -i -e 's/\$(LIBSHSONAME) -o/$(LIBSHSONAME) \$(LDFLAGS) -o/g' \ ${S}/lib/Module.mk - oe_runmake user PROG_EXTRA="sensors sensord" + oe_runmake user PROG_EXTRA="sensors ${PACKAGECONFIG_CONFARGS}" } do_install() { oe_runmake user_install DESTDIR=${D} - install -m 0755 ${S}/prog/sensord/sensord ${D}${sbindir} - install -m 0644 ${S}/prog/sensord/sensord.8 ${D}${mandir}/man8 + if ${@bb.utils.contains('PACKAGECONFIG', 'sensord', 'true', 'false', d)}; then + install -m 0755 ${S}/prog/sensord/sensord ${D}${sbindir} + install -m 0644 ${S}/prog/sensord/sensord.8 ${D}${mandir}/man8 + fi # Install directory install -d ${D}${INIT_D_DIR} @@ -60,12 +74,17 @@ do_install() { # Install fancontrol init script install -m 0755 ${WORKDIR}/fancontrol.init ${D}${INIT_D_DIR}/fancontrol - # Install sensord init script - install -m 0755 ${WORKDIR}/sensord.init ${D}${INIT_D_DIR}/sensord + if ${@bb.utils.contains('PACKAGECONFIG', 'sensord', 'true', 'false', d)}; then + # Install sensord init script + install -m 0755 ${WORKDIR}/sensord.init ${D}${INIT_D_DIR}/sensord + fi # Insall sensord service script - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${S}/prog/init/*.service ${D}${systemd_system_unitdir} + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${S}/prog/init/*.service ${D}${systemd_unitdir}/system + if ! ${@bb.utils.contains('PACKAGECONFIG', 'sensord', 'true', 'false', d)}; then + rm ${D}${systemd_system_unitdir}/sensord.service + fi } RPROVIDES_${PN}-dbg += "${PN}-libsensors-dbg ${PN}-sensors-dbg ${PN}-sensord-dbg ${PN}-isatools-dbg" @@ -89,7 +108,7 @@ PACKAGES =+ "${PN}-libsensors ${PN}-libsensors-dev ${PN}-libsensors-staticdev ${ PACKAGES =+ "${PN}-sensors ${PN}-sensors-doc" # sensord logging daemon -PACKAGES =+ "${PN}-sensord ${PN}-sensord-doc" +PACKAGES =+ "${@bb.utils.contains('PACKAGECONFIG', 'sensord', '${PN}-sensord ${PN}-sensord-doc', '', d)}" # fancontrol script PACKAGES =+ "${PN}-fancontrol ${PN}-fancontrol-doc" |