sys-process/nohang: new package, add 0.2.0, 9999

Signed-off-by: Norbert Norbiros <norbiros@protonmail.com>
This commit is contained in:
Norbert Norbiros
2025-07-12 13:22:50 +02:00
parent 0265f5b955
commit f9e323fbf3
4 changed files with 95 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST nohang-0.2.0.tar.gz 58755 BLAKE2B 5a6667490fc7154b1c729adb88e1ee4d09918d03f1e3b1b0cc7f77b97ecf875e1dd11e75786fe7489b351cd543426a77e82253cf46c501a73d86a226a658b871 SHA512 03edda85f028d6c266851c8f9f9a99f6edb3eb2f32d7dd0d14ce19677b42e72800a11a24b90a639fa34f7f057be824d36360c43c7c129b76dbe9fab3efce5d77

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>norbiros@protonmail.com</email>
<name>Norbiros</name>
</maintainer>
<upstream>
<remote-id type="github">hakavlad/nohang</remote-id>
<bugs-to>https://github.com/hakavlad/nohang/issues</bugs-to>
</upstream>
<longdescription lang="en">
Nohang is a lightweight OOM prevention daemon that monitors system memory and can take action (e.g. sending SIGTERM or SIGKILL) when memory is critically low. It helps improve system responsiveness and stability under memory pressure.
</longdescription>
<use>
<flag name="systemd">Install systemd service file</flag>
</use>
</pkgmetadata>

View File

@@ -0,0 +1,38 @@
# Copyright 2019-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit systemd
DESCRIPTION="A sophisticated low memory handler for Linux"
HOMEPAGE="https://github.com/hakavlad/nohang"
LICENSE="MIT"
SLOT="0"
IUSE="systemd"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/hakavlad/nohang.git"
EGIT_BRANCH="dev"
else
SRC_URI="https://github.com/hakavlad/nohang/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
DEPEND="
dev-lang/python
systemd? ( sys-apps/systemd )
"
RDEPEND="${DEPEND}"
BDEPEND=""
S="${WORKDIR}/${P}"
src_install() {
if use systemd; then
PREFIX="/usr" SYSCONFDIR="/etc" emake DESTDIR="${D}" install
else
PREFIX="/usr" SYSCONFDIR="/etc" emake DESTDIR="${D}" -B install-openrc
fi
}

View File

@@ -0,0 +1,38 @@
# Copyright 2019-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit systemd
DESCRIPTION="A sophisticated low memory handler for Linux"
HOMEPAGE="https://github.com/hakavlad/nohang"
LICENSE="MIT"
SLOT="0"
IUSE="systemd"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/hakavlad/nohang.git"
EGIT_BRANCH="dev"
else
SRC_URI="https://github.com/hakavlad/nohang/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
DEPEND="
dev-lang/python
systemd? ( sys-apps/systemd )
"
RDEPEND="${DEPEND}"
BDEPEND=""
S="${WORKDIR}/${P}"
src_install() {
if use systemd; then
PREFIX="/usr" SYSCONFDIR="/etc" emake DESTDIR="${D}" install
else
PREFIX="/usr" SYSCONFDIR="/etc" emake DESTDIR="${D}" -B install-openrc
fi
}