summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/ananicy')
-rw-r--r--app-admin/ananicy/Manifest1
-rw-r--r--app-admin/ananicy/ananicy-2.2.1-r1.ebuild37
-rw-r--r--app-admin/ananicy/files/ananicy-fix-sysctl-path.patch14
-rw-r--r--app-admin/ananicy/files/ananicy.initd18
-rw-r--r--app-admin/ananicy/metadata.xml16
5 files changed, 86 insertions, 0 deletions
diff --git a/app-admin/ananicy/Manifest b/app-admin/ananicy/Manifest
new file mode 100644
index 000000000000..f0c5c784bbde
--- /dev/null
+++ b/app-admin/ananicy/Manifest
@@ -0,0 +1 @@
+DIST ananicy-2.2.1.tar.gz 43197 BLAKE2B 5fc1fb201c50d7b93b62d089bf341c105b2e931349966e97b2becd0744f24ebd8900ea54e113bc3fc7a2648f4e088a2215b669861a311f2c92f30a8583ad95ad SHA512 858bbfbf196a2b8f512e4f09d8a0f176ef33fbbf610c8de437dc7889830a6f8a302c4d864faa8e28c71d4c1229c112e56b7fd84918d85786153228217aaec7ef
diff --git a/app-admin/ananicy/ananicy-2.2.1-r1.ebuild b/app-admin/ananicy/ananicy-2.2.1-r1.ebuild
new file mode 100644
index 000000000000..7f383bf36891
--- /dev/null
+++ b/app-admin/ananicy/ananicy-2.2.1-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PYTHON_COMPAT=( python3_{8..10} pypy3 )
+
+inherit python-single-r1
+
+DESCRIPTION="ANother Auto NICe daemon"
+HOMEPAGE="https://github.com/Nefelim4ag/Ananicy"
+SRC_URI="https://github.com/Nefelim4ag/Ananicy/archive/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${P^}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+BDEPEND="${PYTHON_DEPS}"
+RDEPEND="
+ ${BDEPEND}
+ sys-process/schedtool
+"
+DOCS=( README.md )
+PATCHES=( "${FILESDIR}/${PN}-fix-sysctl-path.patch" )
+
+src_compile() {
+ return
+}
+
+src_install() {
+ emake PREFIX="${D}" install
+ python_fix_shebang "${ED}/usr/bin/ananicy"
+ doinitd "${FILESDIR}/ananicy.initd"
+ einstalldocs
+}
diff --git a/app-admin/ananicy/files/ananicy-fix-sysctl-path.patch b/app-admin/ananicy/files/ananicy-fix-sysctl-path.patch
new file mode 100644
index 000000000000..1c44fe8c402e
--- /dev/null
+++ b/app-admin/ananicy/files/ananicy-fix-sysctl-path.patch
@@ -0,0 +1,14 @@
+--- a/ananicy.service
++++ b/ananicy.service
+@@ -4,9 +4,9 @@
+
+ [Service]
+ Type=notify
+-ExecStartPre=/sbin/sysctl -e kernel.sched_autogroup_enabled=0
++ExecStartPre=/usr/sbin/sysctl -e kernel.sched_autogroup_enabled=0
+ ExecStart=/usr/bin/ananicy start
+-ExecStopPost=/sbin/sysctl -e kernel.sched_autogroup_enabled=1
++ExecStopPost=/usr/sbin/sysctl -e kernel.sched_autogroup_enabled=1
+ Nice=19
+ SuccessExitStatus=143
+ OOMScoreAdjust=-999
diff --git a/app-admin/ananicy/files/ananicy.initd b/app-admin/ananicy/files/ananicy.initd
new file mode 100644
index 000000000000..e2c31dfb10b7
--- /dev/null
+++ b/app-admin/ananicy/files/ananicy.initd
@@ -0,0 +1,18 @@
+#!/usr/bin/openrc-run
+
+pidfile="/run/ananicy.pid"
+command="/usr/bin/ananicy"
+command_args="start"
+command_background=true
+
+start_pre() {
+ /usr/sbin/sysctl -e kernel.sched_autogroup_enabled=0
+}
+
+stop_post() {
+ /usr/sbin/sysctl -e kernel.sched_autogroup_enabled=1
+}
+
+stop() {
+ start-stop-daemon --stop --pidfile "$pidfile"
+}
diff --git a/app-admin/ananicy/metadata.xml b/app-admin/ananicy/metadata.xml
new file mode 100644
index 000000000000..1385d9ae3f88
--- /dev/null
+++ b/app-admin/ananicy/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>lssndrbarbieri@gmail.com</email>
+ <name>Alessandro Barbieri</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>https://github.com/Nefelim4ag/Ananicy/issues</bugs-to>
+ <remote-id type="github">Nefelim4ag/Ananicy</remote-id>
+ </upstream>
+</pkgmetadata>