meta-netmodule-distro/recipes-tools/sys-mon/sys-mon_git.bb

45 lines
1.3 KiB
BlitzBasic

SUMMARY = "NetModule system monitoring app"
SECTION = "base"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://LICENSE;md5=bde2a6343527f4ace81c3fb4ca0d2742"
SRC_URI = "git://git.netmodule.intranet/nm-tools/features.git;protocol=ssh;user=gitea;branch=develop"
SRCREV = "${AUTOREV}"
SRC_URI_append = " \
file://sys-mon.conf \
file://sys-mon.service \
"
PV = "0.0.1+git${SRCPV}"
DEPENDS_append = " libnmapp"
inherit systemd
S = "${WORKDIR}/git/apps/sys-mon"
B = "${S}/build"
SYSTEMD_SERVICE_${PN} = "sys-mon.service"
FILES_${PN} += " \
${bindir}/sys-mon \
${systemd_system_unitdir}/sys-mon.service \
${sysconfdir}/default/sys-mon.conf \
"
# build variables for the target (rest is default)
EXTRA_OEMAKE_append = " 'BUILD_TARGET=target' 'BUILD_CONFIG=rls' 'SYSROOT=${STAGING_DIR_TARGET}'"
do_install() {
bbplain "Installing ${BPN} to ${bindir}..."
install -d ${D}${bindir}
install -m 555 ${B}/rls/target/${BPN} ${D}${bindir}
bbplain "Installing ${BPN} as systemd service..."
install -d ${D}${sysconfdir}/default
install -m 644 ${WORKDIR}/${BPN}.conf ${D}${sysconfdir}/default/
install -d ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/${BPN}.service ${D}${systemd_system_unitdir}
}