sys-apps/earlyoom: initial import

This commit is contained in:
Julian Ospald 2018-09-14 01:06:14 +08:00
parent 840bf4ad78
commit bea9e503bf
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
3 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,37 @@
# Copyright 2016 Kylie McClain <somasis@exherbo.org>
# 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
}

View File

@ -0,0 +1,2 @@
# see 'earlyoom --help'
EARLYOOM_OPTS=""

View File

@ -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}"