summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-01-09 01:00:50 +0000
committerSam James <sam@gentoo.org>2022-01-09 01:06:32 +0000
commita04969e65a2a1544dd982cd34ac286f1d72b93c4 (patch)
tree76226a595e8ee090b657dd168e614c72d300ebaf
parentapp-admin/logrotate: add 3.19.0 (diff)
downloadgentoo-a04969e65a2a1544dd982cd34ac286f1d72b93c4.tar.gz
gentoo-a04969e65a2a1544dd982cd34ac286f1d72b93c4.tar.bz2
gentoo-a04969e65a2a1544dd982cd34ac286f1d72b93c4.zip
sys-process/atop: add 2.7.1
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--sys-process/atop/Manifest1
-rw-r--r--sys-process/atop/atop-2.7.1.ebuild111
2 files changed, 112 insertions, 0 deletions
diff --git a/sys-process/atop/Manifest b/sys-process/atop/Manifest
index 7b90e6f3cbd5..5dbf3429dc37 100644
--- a/sys-process/atop/Manifest
+++ b/sys-process/atop/Manifest
@@ -1,3 +1,4 @@
DIST atop-2.6.0.tar.gz 242323 BLAKE2B 8cf39c4b18994de26188ad5e19e282bc3ef7693eeff4853386f6b254d1115dbd2308eaa4c6e7620e6081d44037e6ce01356ad72ba25bcf4b1c3e7674768e5c24 SHA512 46cbc1c67ee6683be8dca79bf68d85962a119469ddce4947519cf4fe178b14d54b69451cfaa2b5c0a3f8c9bf8769de619aa5a7768eae34422688c7fc26fe0a58
DIST atop-2.7.0.tar.gz 248294 BLAKE2B 94587d1ea07fcbbc8b267b96d0e7aa89b04cef9b39ccae0057bfb6163b15b8fdf3ddc9edb377bf40f48f60b4dd29feaf64201b1fd8c396dfb34c610772bc629c SHA512 2b3a1fbbd01728228df9ab1b6a99458fa0f962cc945b198a79298152ff115f6131fdb86fc806fc647a28d86e6e1a56375ca9d4dc530e082a122cf6ffba3dac7b
+DIST atop-2.7.1.tar.gz 248809 BLAKE2B 2cf1a68a7b24d76340295d9bde03a5602e9049a860468217771c696fe4b9062f2155aeefa2e3e810984780f82de6bf922bf7d6b02c7fd19194162dc70b015b81 SHA512 18f30c67d6f86b9270599317eed846c63d19e8ba6ea85bad8ec3d5ffb0489f17c75c8d8b3a14054bd14e89ed40d39e5d37bce834c7422087e6d8b86c99273a72
DIST netatop-3.1.tar.gz 22812 BLAKE2B 1b1faebf1392a57db6b4662192f90821289c8fc40c2c1ee0ad61feeeee6477c4d091744a1e82cdd987baf59f8dd71fc6d242d6dd294b8fb29b9447a9d5055996 SHA512 b12fd2287d89d3a8277f8fb540a19e6d26aa26c3f88e7ae2e6601b63f78d642e73b8d16cf351f6979ce7bbf53251b9c1faa76798a87f70cf3dcf51279eb0db68
diff --git a/sys-process/atop/atop-2.7.1.ebuild b/sys-process/atop/atop-2.7.1.ebuild
new file mode 100644
index 000000000000..4e4a270b83e0
--- /dev/null
+++ b/sys-process/atop/atop-2.7.1.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Check on bumps of atop
+# https://www.atoptool.nl/downloadnetatop.php
+NETATOP_VER=3.1
+
+# Controls 'netatop' kernel module
+MODULES_OPTIONAL_USE="modules"
+NETATOP_P=net${PN}-${NETATOP_VER}
+NETATOP_S="${WORKDIR}"/${NETATOP_P}
+
+inherit linux-info linux-mod systemd toolchain-funcs
+
+DESCRIPTION="Resource-specific view of processes"
+HOMEPAGE="https://www.atoptool.nl/ https://github.com/Atoptool/atop"
+SRC_URI="https://github.com/Atoptool/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" modules? ( https://www.atoptool.nl/download/${NETATOP_P}.tar.gz )"
+
+# Module is GPL-2 as well
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="sys-libs/ncurses:0=
+ >=sys-process/acct-6.6.4-r1
+ modules? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.6.0-build.patch
+)
+
+pkg_pretend() {
+ if use kernel_linux ; then
+ CONFIG_CHECK="~BSD_PROCESS_ACCT"
+ check_extra_config
+ fi
+}
+
+src_prepare() {
+ default
+
+ if use modules ; then
+ cd "${WORKDIR}"/${NETATOP_P} || die
+ eapply -p1 "${FILESDIR}"/${PN}-2.7.0-netatop-makefile.patch
+ cd "${S}" || die
+ fi
+
+ tc-export CC PKG_CONFIG
+
+ # bug #191926
+ sed -i 's: root : :' atop.cronsysv || die
+
+ # prefixify
+ sed -i "s:/\(usr\|etc\|var\):${EPREFIX}/\1:g" Makefile || die
+}
+
+src_configure() {
+ default
+
+ BUILD_TARGETS="netatop.ko"
+ MODULE_NAMES="netatop(:${NETATOP_S}/module)"
+}
+
+src_compile() {
+ default
+
+ linux-mod_src_compile
+}
+
+src_install() {
+ linux-mod_src_install
+
+ if use modules ; then
+ # netatop's Makefile tries to build the kernel module for us
+ # so let's just replicate parts of it here.
+ emake -C "${NETATOP_S}"/daemon all
+
+ dosbin "${NETATOP_S}"/daemon/netatopd
+ doman "${NETATOP_S}"/man/*
+
+ systemd_dounit "${NETATOP_S}"/netatop.service
+
+ newinitd "${FILESDIR}"/netatop.rc netatop
+ fi
+
+ emake DESTDIR="${D}" genericinstall
+
+ # useless -${PV} copies ?
+ rm "${ED}"/usr/bin/atop*-${PV} || die
+
+ newinitd "${FILESDIR}"/${PN}.rc-r2 ${PN}
+ newinitd "${FILESDIR}"/atopacct.rc atopacct
+
+ systemd_dounit "${FILESDIR}"/${PN}.service-r1
+ systemd_dounit "${FILESDIR}"/atopacct.service
+
+ dodoc atop.cronsysv AUTHOR README
+
+ exeinto /usr/share/${PN}
+ doexe ${PN}.daily
+
+ insinto /etc/default
+ newins ${PN}{.default,}
+
+ keepdir /var/log/${PN}
+}