Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
HOMEPAGE = "https://github.com/qualcomm/userspace-resource-manager"
SUMMARY = "Userspace daemon for dynamic System resource management"
DESCRIPTION = "Userspace Resource Manager(URM) is a lightweight userspace \
daemon that monitors system resources and enforces policies using \
Linux kernel interfaces such as cgroups and sysfs."

LICENSE = "BSD-3-Clause-Clear"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2998c54c288b081076c9af987bdf4838"

SRC_URI = "git://github.com/qualcomm/userspace-resource-manager.git;protocol=https;branch=main;tag=v${PV}"
SRCREV = "ee61f21cc0857639e3adeb9af36fc318adeed00b"

inherit cmake pkgconfig systemd

DEPENDS += "libyaml"

PACKAGECONFIG ??= "\
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'state-detector', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
tests \
"

PACKAGECONFIG[classifier] = "-DBUILD_CLASSIFIER=ON,-DBUILD_CLASSIFIER=OFF"
PACKAGECONFIG[state-detector] = "-DBUILD_STATE_DETECTOR=ON,-DBUILD_STATE_DETECTOR=OFF"
PACKAGECONFIG[systemd] = ",,systemd"
PACKAGECONFIG[tests] = "-DBUILD_TESTS=ON,-DBUILD_TESTS=OFF"

SYSTEMD_SERVICE:${PN} = "urm.service"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ensure the unit works, you'll need something like this:

do_install_prepend() {
sed -i s:/usr/bin/:${bindir}:g urm.service
}

Without this DISTROs that set bindir to e.g. /bin will fail.

FILES:${PN} += "${sysconfdir}/urm/*"

PACKAGE_BEFORE_PN += "${PN}-tests"
FILES:${PN}-tests += " \
${sysconfdir}/urm/tests/* \
${bindir}/RestuneComponentTests \
${bindir}/RestuneIntegrationTests \
${libdir}/libRestuneTestUtils.so* \
${libdir}/libRestunePlugin.so* \
"