47 lines
1.2 KiB
BlitzBasic
47 lines
1.2 KiB
BlitzBasic
SUMMARY = "htoprc - global htop configuration"
|
|
LICENSE = "MIT"
|
|
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
|
|
|
SRC_URI = " \
|
|
file://common.htoprc.in \
|
|
file://meters_singlecore_no_swap.htoprc.in \
|
|
file://meters_singlecore_with_swap.htoprc.in \
|
|
file://screens_singlecore.htoprc.in \
|
|
file://screens_multicore.htoprc.in \
|
|
"
|
|
|
|
DEPENDS = "htop"
|
|
PREFERRED_VERSION_htop = "3.2.2"
|
|
|
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
|
|
|
# Sensible(?) defaults
|
|
MACHINE_NUM_CORES ??= "1"
|
|
HAS_SWAP ??= "0"
|
|
|
|
do_compile() {
|
|
T=${B}/htoprc
|
|
cat ${WORKDIR}/common.htoprc.in > $T
|
|
|
|
if [ "${MACHINE_NUM_CORES}" -eq "1" ]; then
|
|
cat ${WORKDIR}/screens_singlecore.htoprc.in >> $T
|
|
if [ "${HAS_SWAP}" -eq "0" ]; then
|
|
cat ${WORKDIR}/meters_singlecore_no_swap.htoprc.in >> $T
|
|
else
|
|
cat ${WORKDIR}/meters_singlecore_with_swap.htoprc.in >> $T
|
|
fi
|
|
else
|
|
cat ${WORKDIR}/screens_multicore.htoprc.in >> $T
|
|
# TODO: these files do not exist yet
|
|
if [ "${HAS_SWAP}" -eq "0" ]; then
|
|
cat ${WORKDIR}/meters_multicore_no_swap.htoprc.in >> $T
|
|
else
|
|
cat ${WORKDIR}/meters_multicore_with_swap.htoprc.in >> $T
|
|
fi
|
|
fi
|
|
}
|
|
|
|
do_install() {
|
|
install -D -m 0644 ${B}/htoprc ${D}${sysconfdir}/htoprc
|
|
}
|