From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 823061382C5 for ; Thu, 13 May 2021 18:51:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 90C51E07DB; Thu, 13 May 2021 18:51:02 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7B8CFE07DB for ; Thu, 13 May 2021 18:51:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4076A340B4D for ; Thu, 13 May 2021 18:51:00 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C21E9735 for ; Thu, 13 May 2021 18:50:58 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1620921438.1a23cc6ad5cf3f5ce68ef5e4dc546a73b7343bb1.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: app-admin/ananicy/files/, app-admin/ananicy/ X-VCS-Repository: repo/proj/guru X-VCS-Files: app-admin/ananicy/ananicy-2.2.1-r1.ebuild app-admin/ananicy/files/ananicy.initd X-VCS-Directories: app-admin/ananicy/ app-admin/ananicy/files/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: 1a23cc6ad5cf3f5ce68ef5e4dc546a73b7343bb1 X-VCS-Branch: master Date: Thu, 13 May 2021 18:50:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 62aafef7-7a17-4292-8a9f-dad898903deb X-Archives-Hash: 0066c2a5a392e82ff465e5e20b72818f commit: 1a23cc6ad5cf3f5ce68ef5e4dc546a73b7343bb1 Author: Alessandro Barbieri gmail com> AuthorDate: Thu May 13 15:55:26 2021 +0000 Commit: Andrew Ammerlaan riseup net> CommitDate: Thu May 13 15:57:18 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1a23cc6a app-admin/ananicy: add openrc initd Signed-off-by: Alessandro Barbieri gmail.com> app-admin/ananicy/ananicy-2.2.1-r1.ebuild | 36 +++++++++++++++++++++++++++++++ app-admin/ananicy/files/ananicy.initd | 18 ++++++++++++++++ 2 files changed, 54 insertions(+) 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 000000000..4ad74bc5a --- /dev/null +++ b/app-admin/ananicy/ananicy-2.2.1-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7,8,9} 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}" +DEPEND="${PYTHON_DEPS}" +RDEPEND=" + ${DEPEND} + sys-process/schedtool +" +DOCS=( README.md ) +PATCHES=( "${FILESDIR}/fix-sysctl-path.patch" ) + +src_compile() { + return +} + +src_install() { + emake PREFIX="${D}" install + python_fix_shebang "${ED}/usr/bin/ananicy" + doinitd ananicy.initd + einstalldocs +} diff --git a/app-admin/ananicy/files/ananicy.initd b/app-admin/ananicy/files/ananicy.initd new file mode 100644 index 000000000..e949d54e6 --- /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() { + /sbin/sysctl -e kernel.sched_autogroup_enabled=0 +} + +stop_post() { + /sbin/sysctl -e kernel.sched_autogroup_enabled=1 +} + +stop() { + start-stop-daemon --stop --pidfile "$pidfile" +}