From 3d7d39c338b8726cdeeeb73a86b31e9643245128 Mon Sep 17 00:00:00 2001 From: ILMostro Date: Mon, 21 May 2018 06:13:48 -0500 Subject: updated ebuild using linux-mod eclass --- sys-process/netatop/netatop-2.0.ebuild | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'sys-process') diff --git a/sys-process/netatop/netatop-2.0.ebuild b/sys-process/netatop/netatop-2.0.ebuild index 0f9d73d..1a052ea 100644 --- a/sys-process/netatop/netatop-2.0.ebuild +++ b/sys-process/netatop/netatop-2.0.ebuild @@ -4,6 +4,8 @@ EAPI="6" +inherit eutils linux-mod user + DESCRIPTION="Optional kernel module for sys-process/atop to gather statistics about TCP/UDP packets transmitted/received per process and per thread" HOMEPAGE="http://www.atoptool.nl/netatop.php" SRC_URI="http://www.atoptool.nl/download/${P}.tar.gz" @@ -11,20 +13,34 @@ SRC_URI="http://www.atoptool.nl/download/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" +IUSE="pax_kernel" PATCHES="${FILESDIR}/netatop-karch.patch" CHOST_amd64=x86_64-unknown-linux-gnu CHOST_x86=i686-unknown-linux-gnu + +BUILD_TARGETS="all" +BUILD_TARGET_ARCH="${ARCH}" +MODULE_NAMES="netatop(misc:${S}:${S}/module)" + +pkg_setup() { + linux-mod_pkg_setup + BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERN_DIR=${KV_DIR} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1" +} + src_prepare() { - # dodir /lib/modules/$(uname -r)/extra; sed -i 's/extra/misc/' Makefile || die "sed expression failed" default_src_prepare eapply_user } src_install() { - # dolib module/netatop.ko - default + linux-mod_src_install + insinto /usr/lib/modules-load.d/ + doins "${FILESDIR}"/netatop.conf +} + +pkg_postinst() { + linux-mod_pkg_postinst } -- cgit v1.2.3-65-gdbad