libmad: update to 0.16.4
[feed/packages.git] / admin / netatop / Makefile
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 #
4
5 include $(TOPDIR)/rules.mk
6
7 PKG_NAME:=netatop
8 PKG_RELEASE:=1
9 PKG_VERSION:=3.1
10 PKG_LICENSE:=GPL-2.0
11 PKG_SOURCE_URL:=https://www.atoptool.nl/download/
12 PKG_HASH:=736f43572c31a90748f023f0a5a814bff58d44c0c3f060d776cfd6e6e8435c62
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_MAINTAINER:=Toni Uhlig <matzeton@googlemail.com>
16
17 include $(INCLUDE_DIR)/package.mk
18 include $(INCLUDE_DIR)/kernel.mk
19
20 define KernelPackage/netatop
21 URL:=https://www.atoptool.nl/
22 CATEGORY:=Kernel modules
23 SUBMENU:=Netfilter Extensions
24 TITLE:=netatop netfilter module
25 FILES:= \
26 $(PKG_BUILD_DIR)/module/netatop.$(LINUX_KMOD_SUFFIX)
27 AUTOLOAD:=$(call AutoProbe,netatop)
28 endef
29
30 define KernelPackage/netatop/description
31 The optional kernel module netatop can be loaded to gather statistics about
32 the TCP and UDP packets that have been transmitted/received per process and
33 per thread. As soon as atop discovers that this module is active, it shows
34 the columns SNET and RNET in the generic screen for the number of transmitted
35 and received packets per process. When the 'n' key is pressed, it shows
36 detailed counters about the number packets transmitted/received via TCP and
37 UDP, the average sizes of these packets, and the total bandwidth consumed
38 for input and output per process/thread.
39 endef
40
41 define Package/netatop
42 SECTION:=admin
43 CATEGORY:=Administration
44 TITLE:=network counter for atop
45 DEPENDS:=+zlib +kmod-netatop
46 URL:=https://www.atoptool.nl/
47 endef
48
49 define Package/netatop/description
50 The daemon netatopd is packaged with the netatop kernel module. This
51 daemon takes care that information is gathered about processes that are
52 finished. For every finished process that has transferred network packets,
53 a binary record is written to a dedicated logfile. The added records in the
54 logfile are read by atop with every sample to show information about the
55 network activity of finished processes as well.
56 endef
57
58 NETATOP_KMOD_MAKEOPTS= \
59 ARCH="$(LINUX_KARCH)" \
60 CROSS_COMPILE="$(TARGET_CROSS)" \
61 KERNDIR="$(LINUX_DIR)"
62 NETATOP_DAEMON_MAKEOPTS= \
63 CC="$(TARGET_CC)" \
64 CFLAGS="$(TARGET_CFLAGS)" \
65 LDFLAGS="$(TARGET_LDFLAGS)"
66
67 define Build/Compile/netatop
68 $(MAKE) -C $(PKG_BUILD_DIR)/module \
69 $(NETATOP_KMOD_MAKEOPTS) \
70 netatop.$(LINUX_KMOD_SUFFIX)
71 $(MAKE) -C $(PKG_BUILD_DIR)/daemon \
72 $(NETATOP_DAEMON_MAKEOPTS) \
73 all
74 endef
75
76 define Build/Compile
77 $(call Build/Compile/netatop)
78 endef
79
80 define Package/netatop/install
81 $(INSTALL_DIR) $(1)/usr/sbin/
82 $(INSTALL_BIN) $(PKG_BUILD_DIR)/daemon/netatopd $(1)/usr/sbin/
83 endef
84
85 $(eval $(call KernelPackage,netatop))
86 $(eval $(call BuildPackage,netatop))