summaryrefslogtreecommitdiff
path: root/sys-apps/earlyoom
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/earlyoom')
-rw-r--r--sys-apps/earlyoom/Manifest7
-rw-r--r--sys-apps/earlyoom/earlyoom-1.7.ebuild61
-rw-r--r--sys-apps/earlyoom/earlyoom-9999.ebuild50
-rw-r--r--sys-apps/earlyoom/metadata.xml3
4 files changed, 101 insertions, 20 deletions
diff --git a/sys-apps/earlyoom/Manifest b/sys-apps/earlyoom/Manifest
index bda6044dad6d..63127312b1dd 100644
--- a/sys-apps/earlyoom/Manifest
+++ b/sys-apps/earlyoom/Manifest
@@ -3,7 +3,10 @@ AUX earlyoom-1.3-test-fixed.patch 1425 BLAKE2B 47231739b8bbb5a4a290266b85900dc18
AUX earlyoom-r1 138 BLAKE2B a95a6db627133ed3d9e4fa02505a1fb8abfc17c345a16df9956d7842c5cb9b7cefd1c68b82d7cc42ad101dcf65c06ac526e0e1241989d4aed0fc87b62d8e7bc9 SHA512 f7223b7ad2780ae121ef91d19b177d6fda50eb8d4f3995ac47b34f843448917a5a5290b8e657a9d7ed7fb8a958b362172d8a6453c5d5e43ff8c78cc25456d6f8
DIST earlyoom-1.3.tar.gz 31399 BLAKE2B 3867540afb23493fbb532bcb72a5cfacca4ed297a053ff5e2c7e394bfa3640887e3e7c6430789bc1eda4b7a68680d8a74ab56b641fe9e5d4caa4406e2edb0667 SHA512 c5de742289e82c2098bd88c61dcb3e20eb022905a015b4894c95a4de3978ce18d794a9e7c17c97851ca9f8888728908f7bf978c014b3b69799bffa8b546d258a
DIST earlyoom-1.6.2.tar.gz 49006 BLAKE2B 85a02d4171ba1bb94d5ddf573b8f5ac58d28a0cf9766f4fb2c96be5b45eee7aab853008c36f9e3aac76685b70008051faa2fe339797ecf9137469f089935a6b3 SHA512 d622a5347591d2017f6e62255940482af431e647acf1b35ab035e0dbfd44da7fc52633e6dd6433e42a1348fd294d766550ba092260f3ec59bd51e545f08e466b
+DIST earlyoom-1.7-deps.tar.xz 1974036 BLAKE2B ff378ae64b6b293e3b9d9fa05607209a515edadd18edcb70e204de1e0808b06dfaca7e6dcddeffbda9dae8abbadf7ac6074df725997b96be8a8d8cc35ac4d8c8 SHA512 67072000f8695935f77494faca84c74c67de4b9a4b3b889b310ad674f28c7ed85a0d59e91f4d5caa06cc1d7c1e7ef31aa3a373851361b905dc29e6d4d04eeeb9
+DIST earlyoom-1.7.tar.gz 52210 BLAKE2B c8338434160e4ccaa5ee64299487ca47a3d94e894362c320cf8210caf895a34c7abb584654afcdcb6fc1e058d53c1fa7eb740477acb104ed295700faccbcbdc1 SHA512 5732632c38d9b511aaa81845b3d8f8afe737aa6498dca7e31accaf18bfcf271ba436946aa06a514a34c953f99343f9b197d8a2b8751e16d336aeb084944f3602
EBUILD earlyoom-1.3.ebuild 1035 BLAKE2B 64ab6ed459eb6138383569f8b1e03fad94bc4573353ea749ca65a564b2be47f398072974ea5a26c40d3521aa40e27296ebc2a4cd794a01376a652fdcce4dc304 SHA512 79d26e8b94db7b379a9745f2a4a3268fa25cfd97a53897ef29caf7267ab9428b3e096744861c64d6c64afa54cd55e4a565faf3c568a296323d486207ce0a7595
EBUILD earlyoom-1.6.2.ebuild 1054 BLAKE2B c9505019f4a676f11c707a7dd785ee5818fc2ee575674f61a1af90d761d24cc253c7a8e6be93571ca0ac942837c5938c836ce92ccc43945868e7764b039e4cfc SHA512 56570338533bebb7fbad9d884548dc7474d82ee2a30e89715f3ffcdb7e92431f17e461463fe91d41b85ce7d54a6a22f3d9c488d785ca466d2018a0d7c67d5315
-EBUILD earlyoom-9999.ebuild 970 BLAKE2B 88a517b48f7367e9abac73dcbc1661e0f0344626506c8e5380a88e6d61fd7b996d93696952fa10b057c579cb5a5490abfa516cecd90a6f916f28f834343cb1df SHA512 342d48f9a0ebedeea82a6995a3ae456745d95d099e61f9ba2d27122a7193df2d8566e139526aa95286e9c12ac401971f1704d029d42783f8faf6956f128e2b10
-MISC metadata.xml 308 BLAKE2B 27c4384e1323317f7215e590fb7c7c39b33aadc39d9e52d97d910e8780e8f9105b9191d63689c092e06c12a998999270a916360f4af2721b510370bf6eea4e0a SHA512 f2761fadda96c861d715f4bfc9e61bd67eecee936ba5ce26cff3ea6acaa40447322395df186188eec9449f429d535b05aeff04bc99c829ff940b3dbcb79b5416
+EBUILD earlyoom-1.7.ebuild 1245 BLAKE2B 35b096159f6a944c20e6f586716f772d81660f575223dc51f4af6c28ccf90c5aefd02877251c3e1ca39120794a5d227d3dc08a63b7bd6980e16f512ac7029ab9 SHA512 f30be55754ae2f70334edd82291abaf4d412a32306e7257a3c47149f3a64e70e9236e465edfe3ad71bd7b6f071d5f601122609f9b5e51991db08538257f6d315
+EBUILD earlyoom-9999.ebuild 1245 BLAKE2B 35b096159f6a944c20e6f586716f772d81660f575223dc51f4af6c28ccf90c5aefd02877251c3e1ca39120794a5d227d3dc08a63b7bd6980e16f512ac7029ab9 SHA512 f30be55754ae2f70334edd82291abaf4d412a32306e7257a3c47149f3a64e70e9236e465edfe3ad71bd7b6f071d5f601122609f9b5e51991db08538257f6d315
+MISC metadata.xml 389 BLAKE2B 2a9867dcee589d823ca6800813b22abdfae0122f49a307147be75c7890d05f859b29b0dfcda33837a7e7ab04c6b0d5d2ff9b4c0afe8c8a575c10fba26a866f11 SHA512 0eaf58d4de7afb7892646c0b0567cb25527e6608393046e037b5e3609decda79c4729d4687dec381df054c2a724bef261235adeeaa7c9159f16dc3a0098f3aa0
diff --git a/sys-apps/earlyoom/earlyoom-1.7.ebuild b/sys-apps/earlyoom/earlyoom-1.7.ebuild
new file mode 100644
index 000000000000..42e4a6373240
--- /dev/null
+++ b/sys-apps/earlyoom/earlyoom-1.7.ebuild
@@ -0,0 +1,61 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+GO_OPTIONAL=1
+inherit go-module systemd toolchain-funcs
+
+DESCRIPTION="Early OOM Daemon for Linux"
+HOMEPAGE="https://github.com/rfjakob/earlyoom"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/rfjakob/earlyoom.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/rfjakob/earlyoom/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar.xz )"
+
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="MIT-with-advertising"
+SLOT="0"
+IUSE="man test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ man? ( virtual/pandoc )
+ test? ( dev-lang/go )
+"
+
+src_unpack() {
+ default
+
+ use test && go-module_src_unpack
+}
+
+src_compile() {
+ tc-export CC
+
+ emake \
+ PREFIX="${EPREFIX}"/usr \
+ VERSION="v${PV}" \
+ SYSTEMDUNITDIR="$(systemd_get_systemunitdir)" \
+ earlyoom earlyoom.service $(usev man 'earlyoom.1')
+}
+
+src_install() {
+ dobin earlyoom
+
+ use man && doman earlyoom.1
+
+ insinto /etc/default
+ newins earlyoom.default earlyoom
+
+ dodir /etc/conf.d
+ dosym -r /etc/default/earlyoom /etc/conf.d/earlyoom
+
+ newinitd "${FILESDIR}"/${PN}-r1 ${PN}
+ systemd_dounit earlyoom.service
+}
diff --git a/sys-apps/earlyoom/earlyoom-9999.ebuild b/sys-apps/earlyoom/earlyoom-9999.ebuild
index 6a2d2be6cf4e..42e4a6373240 100644
--- a/sys-apps/earlyoom/earlyoom-9999.ebuild
+++ b/sys-apps/earlyoom/earlyoom-9999.ebuild
@@ -1,47 +1,61 @@
-# Copyright 2020-2021 Gentoo Authors
+# Copyright 2020-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit systemd
+GO_OPTIONAL=1
+inherit go-module systemd toolchain-funcs
DESCRIPTION="Early OOM Daemon for Linux"
HOMEPAGE="https://github.com/rfjakob/earlyoom"
-LICENSE="MIT-with-advertising"
-SLOT="0"
-if [ "${PV}" = "9999" ]; then
+if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/rfjakob/earlyoom.git"
inherit git-r3
else
SRC_URI="https://github.com/rfjakob/earlyoom/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar.xz )"
+
KEYWORDS="~amd64 ~x86"
fi
-IUSE="docs systemd test"
-RDEPEND=""
-DEPEND=""
+LICENSE="MIT-with-advertising"
+SLOT="0"
+IUSE="man test"
+RESTRICT="!test? ( test )"
+
BDEPEND="
- docs? ( app-text/pandoc )
+ man? ( virtual/pandoc )
test? ( dev-lang/go )
"
-#tests don't work
-RESTRICT=test
+src_unpack() {
+ default
+
+ use test && go-module_src_unpack
+}
src_compile() {
- VERSION="v${PV}" emake earlyoom
- use docs && VERSION="v${PV}" emake earlyoom.1
- use systemd && emake PREFIX=/usr earlyoom.service
+ tc-export CC
+
+ emake \
+ PREFIX="${EPREFIX}"/usr \
+ VERSION="v${PV}" \
+ SYSTEMDUNITDIR="$(systemd_get_systemunitdir)" \
+ earlyoom earlyoom.service $(usev man 'earlyoom.1')
}
src_install() {
dobin earlyoom
- use docs && doman earlyoom.1
+
+ use man && doman earlyoom.1
insinto /etc/default
newins earlyoom.default earlyoom
- doinitd "${FILESDIR}/${PN}"
- use systemd && systemd_dounit earlyoom.service
+ dodir /etc/conf.d
+ dosym -r /etc/default/earlyoom /etc/conf.d/earlyoom
+
+ newinitd "${FILESDIR}"/${PN}-r1 ${PN}
+ systemd_dounit earlyoom.service
}
diff --git a/sys-apps/earlyoom/metadata.xml b/sys-apps/earlyoom/metadata.xml
index b491101684a6..36cf5295a65f 100644
--- a/sys-apps/earlyoom/metadata.xml
+++ b/sys-apps/earlyoom/metadata.xml
@@ -8,4 +8,7 @@
<use>
<flag name="docs">Generate man page</flag>
</use>
+ <upstream>
+ <remote-id type="github">rfjakob/earlyoom</remote-id>
+ </upstream>
</pkgmetadata>