8 |
8 |
NETATOP_VER=3.1
|
9 |
9 |
|
10 |
10 |
# Controls 'netatop' kernel module
|
11 |
|
MODULES_OPTIONAL_USE="modules"
|
12 |
|
NETATOP_P=net${PN}-${NETATOP_VER}
|
|
11 |
MODULES_OPTIONAL_IUSE="modules"
|
|
12 |
NETATOP_P=netatop-${NETATOP_VER}
|
13 |
13 |
NETATOP_S="${WORKDIR}"/${NETATOP_P}
|
14 |
14 |
|
15 |
|
inherit linux-info linux-mod systemd toolchain-funcs
|
|
15 |
inherit linux-mod-r1 systemd toolchain-funcs
|
16 |
16 |
|
17 |
17 |
DESCRIPTION="Resource-specific view of processes"
|
18 |
18 |
HOMEPAGE="https://www.atoptool.nl/ https://github.com/Atoptool/atop"
|
... | ... | |
22 |
22 |
# Module is GPL-2 as well
|
23 |
23 |
LICENSE="GPL-2"
|
24 |
24 |
SLOT="0"
|
25 |
|
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~mips ppc ~ppc64 ~riscv x86 ~amd64-linux ~x86-linux"
|
|
25 |
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~mips ppc ~ppc64 ~riscv x86 ~amd64-linux ~x86-linux"
|
26 |
26 |
|
27 |
27 |
RDEPEND="
|
28 |
28 |
sys-libs/ncurses:=
|
|
29 |
sys-libs/zlib
|
29 |
30 |
>=sys-process/acct-6.6.4-r1
|
30 |
|
modules? ( sys-libs/zlib )
|
31 |
31 |
"
|
32 |
32 |
DEPEND="${RDEPEND}"
|
33 |
33 |
BDEPEND="virtual/pkgconfig"
|
... | ... | |
48 |
48 |
|
49 |
49 |
if use modules ; then
|
50 |
50 |
cd "${WORKDIR}"/${NETATOP_P} || die
|
51 |
|
eapply -p1 "${FILESDIR}"/${PN}-2.7.0-netatop-makefile.patch
|
|
51 |
eapply "${FILESDIR}"/${PN}-2.9.0-netatop-makefile.patch
|
52 |
52 |
cd "${S}" || die
|
53 |
53 |
fi
|
54 |
54 |
|
... | ... | |
57 |
57 |
# bug #191926
|
58 |
58 |
sed -i 's: root : :' atop.cronsysv || die
|
59 |
59 |
|
60 |
|
# prefixify
|
|
60 |
# Prefixify
|
61 |
61 |
sed -i "s:/\(usr\|etc\|var\):${EPREFIX}/\1:g" Makefile || die
|
62 |
62 |
}
|
63 |
63 |
|
64 |
|
src_configure() {
|
65 |
|
default
|
66 |
|
|
67 |
|
BUILD_TARGETS="netatop.ko"
|
68 |
|
MODULE_NAMES="netatop(:${NETATOP_S}/module)"
|
69 |
|
}
|
70 |
|
|
71 |
64 |
src_compile() {
|
72 |
65 |
default
|
73 |
66 |
|
74 |
|
linux-mod_src_compile
|
75 |
|
}
|
76 |
|
|
77 |
|
src_install() {
|
78 |
|
linux-mod_src_install
|
|
67 |
local modlist=( "netatop=:../${NETATOP_P}/module::netatop.ko" )
|
|
68 |
linux-mod-r1_src_compile
|
79 |
69 |
|
80 |
70 |
if use modules ; then
|
81 |
71 |
# netatop's Makefile tries to build the kernel module for us
|
82 |
72 |
# so let's just replicate parts of it here.
|
83 |
73 |
emake -C "${NETATOP_S}"/daemon all
|
|
74 |
fi
|
|
75 |
}
|
84 |
76 |
|
|
77 |
src_install() {
|
|
78 |
linux-mod-r1_src_install
|
|
79 |
|
|
80 |
if use modules ; then
|
85 |
81 |
dosbin "${NETATOP_S}"/daemon/netatopd
|
86 |
82 |
doman "${NETATOP_S}"/man/*
|
87 |
83 |
|