commit:     f9e323fbf3c8193f658077d268f1b32a9780a8ac
Author:     Norbert Norbiros <norbiros <AT> protonmail <DOT> com>
AuthorDate: Sat Jul 12 11:22:50 2025 +0000
Commit:     Norbert Szeremet <norbiros <AT> protonmail <DOT> com>
CommitDate: Sat Aug 16 14:22:35 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f9e323fb

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

Signed-off-by: Norbert Norbiros <norbiros <AT> protonmail.com>

 sys-process/nohang/Manifest            |  1 +
 sys-process/nohang/metadata.xml        | 18 ++++++++++++++++
 sys-process/nohang/nohang-0.2.0.ebuild | 38 ++++++++++++++++++++++++++++++++++
 sys-process/nohang/nohang-9999.ebuild  | 38 ++++++++++++++++++++++++++++++++++
 4 files changed, 95 insertions(+)

diff --git a/sys-process/nohang/Manifest b/sys-process/nohang/Manifest
new file mode 100644
index 0000000000..c2fd6f4dd3
--- /dev/null
+++ b/sys-process/nohang/Manifest
@@ -0,0 +1 @@
+DIST nohang-0.2.0.tar.gz 58755 BLAKE2B 
5a6667490fc7154b1c729adb88e1ee4d09918d03f1e3b1b0cc7f77b97ecf875e1dd11e75786fe7489b351cd543426a77e82253cf46c501a73d86a226a658b871
 SHA512 
03edda85f028d6c266851c8f9f9a99f6edb3eb2f32d7dd0d14ce19677b42e72800a11a24b90a639fa34f7f057be824d36360c43c7c129b76dbe9fab3efce5d77

diff --git a/sys-process/nohang/metadata.xml b/sys-process/nohang/metadata.xml
new file mode 100644
index 0000000000..4b9b1e9303
--- /dev/null
+++ b/sys-process/nohang/metadata.xml
@@ -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>[email protected]</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>

diff --git a/sys-process/nohang/nohang-0.2.0.ebuild 
b/sys-process/nohang/nohang-0.2.0.ebuild
new file mode 100644
index 0000000000..97fb3297c3
--- /dev/null
+++ b/sys-process/nohang/nohang-0.2.0.ebuild
@@ -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
+}

diff --git a/sys-process/nohang/nohang-9999.ebuild 
b/sys-process/nohang/nohang-9999.ebuild
new file mode 100644
index 0000000000..97fb3297c3
--- /dev/null
+++ b/sys-process/nohang/nohang-9999.ebuild
@@ -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
+}

Reply via email to