ledmon: Fix systemd unit install

Use confgure knob to emable systemd service unitfile generation.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj
2023-11-19 19:44:09 -08:00
parent f13feb0adf
commit 5e1ddd1e7f
+2 -7
View File
@@ -25,15 +25,10 @@ COMPATIBLE_HOST:libc-musl = "null"
S = "${WORKDIR}/git"
EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-systemd', '', d)}"
EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'"
# The ledmon sources include headers in ${S}/config to build but not in CFLAGS.
# We need to add this include path in CFLAGS.
CFLAGS += "-I${S}/config"
do_install:append() {
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${systemd_unitdir}/system
install -m 0755 ${S}/systemd/ledmon.service ${D}${systemd_unitdir}/system
fi
}