xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-bsp/ledmon/ledmon_git.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1SUMMARY = "Intel(R) Enclosure LED Utilities"
2
3DESCRIPTION = "The utilities are designed primarily to be used on storage servers \
4 utilizing MD devices (aka Linux Software RAID) for RAID arrays.\
5"
6HOMEPAGE = "https://github.com/intel/ledmon"
7
8LICENSE = "GPL-2.0-only"
9LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
10"
11
12DEPENDS = "sg3-utils udev"
13
14inherit autotools systemd
15
16SYSTEMD_SERVICE:${PN} = "ledmon.service"
17
18# 0.93
19SRC_URI = "git://github.com/intel/ledmon;branch=master;protocol=https \
20           file://0002-include-sys-select.h-and-sys-types.h.patch \
21           file://0001-Don-t-build-with-Werror-to-fix-compile-error.patch \
22          "
23
24SRCREV = "1d72f9cb5c9163b2ecdf19709935720e65f5b90e"
25
26COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
27COMPATIBLE_HOST:libc-musl = "null"
28
29S = "${WORKDIR}/git"
30EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'"
31
32# The ledmon sources include headers in ${S}/config to build but not in CFLAGS.
33# We need to add this include path in CFLAGS.
34CFLAGS += "-I${S}/config"
35
36do_install:append() {
37        if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
38	        install -d ${D}${systemd_unitdir}/system
39	        install -m 0755 ${S}/systemd/ledmon.service ${D}${systemd_unitdir}/system
40        fi
41}
42