From bea9e503bff015514f40e048b0b59fcc997670ba Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Fri, 14 Sep 2018 01:06:14 +0800 Subject: [PATCH] sys-apps/earlyoom: initial import --- .../sys-apps/earlyoom/earlyoom-1.1.exheres-0 | 37 +++++++++++++++++++ .../earlyoom/files/openrc/confd/earlyoom | 2 + .../earlyoom/files/openrc/initd/earlyoom | 10 +++++ 3 files changed, 49 insertions(+) create mode 100644 packages/sys-apps/earlyoom/earlyoom-1.1.exheres-0 create mode 100644 packages/sys-apps/earlyoom/files/openrc/confd/earlyoom create mode 100644 packages/sys-apps/earlyoom/files/openrc/initd/earlyoom diff --git a/packages/sys-apps/earlyoom/earlyoom-1.1.exheres-0 b/packages/sys-apps/earlyoom/earlyoom-1.1.exheres-0 new file mode 100644 index 00000000..ce22ffb4 --- /dev/null +++ b/packages/sys-apps/earlyoom/earlyoom-1.1.exheres-0 @@ -0,0 +1,37 @@ +# Copyright 2016 Kylie McClain +# Distributed under the terms of the GNU General Public License v2 + +require github [ user='rfjakob' tag="v${PV}" ] +require systemd-service [ systemd_files=[ ${PN}.service ] ] +require openrc-service [ openrc_confd_files=[ "${FILES}"/openrc/confd ] ] + +SUMMARY="A better and more proactive out-of-memory killer" +SLOT="0" +LICENCES="MIT" + +DEPENDENCIES=" + test: + dev-lang/go +" + +MYOPTIONS="" + +# tests never work in paludis/sydbox +RESTRICT="test" + +PLATFORMS="~amd64" + +src_compile() { + emake \ + VERSION=${PV} \ + PREFIX=/usr/$(exhost --target) \ + ${PN}.service ${PN} +} + +src_install() { + dobin earlyoom + install_systemd_files + install_openrc_files + emagicdocs +} + diff --git a/packages/sys-apps/earlyoom/files/openrc/confd/earlyoom b/packages/sys-apps/earlyoom/files/openrc/confd/earlyoom new file mode 100644 index 00000000..64a59c6a --- /dev/null +++ b/packages/sys-apps/earlyoom/files/openrc/confd/earlyoom @@ -0,0 +1,2 @@ +# see 'earlyoom --help' +EARLYOOM_OPTS="" diff --git a/packages/sys-apps/earlyoom/files/openrc/initd/earlyoom b/packages/sys-apps/earlyoom/files/openrc/initd/earlyoom new file mode 100644 index 00000000..43aacee7 --- /dev/null +++ b/packages/sys-apps/earlyoom/files/openrc/initd/earlyoom @@ -0,0 +1,10 @@ +#!/sbin/runscript +# Distributed under the terms of the GNU General Public License v2 + +description="earlyoom - Early OOM Daemon for Linux " +pidfile="/run/earlyoom.pid" +command="/usr/bin/earlyoom" +command_background="yes" +command_args="${EARLYOOM_OPTS}" +start_stop_daemon_args="-p ${pidfile}" +