blob: a0ab97284e1d5724fb83abc05d279155540faec8 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#
2# Copyright (C) 2016 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=iptraf-ng
11PKG_VERSION:=1.1.4
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=https://infrastructure.fedoraproject.org/infra/hosted-content/$(PKG_NAME)/$(PKG_NAME)
16PKG_HASH:=79140cf07c0cceb1b5723242847a73aa86f5e4f9dccfe8970fda6801d347eb09
17
18PKG_LICENSE:=GPL-2.0
19PKG_LICENSE_FILES:=LICENSE
20
21PKG_MAINTAINER:=
22
23PKG_CHECK_FORMAT_SECURITY:=0
24
25include $(INCLUDE_DIR)/package.mk
26
27define Package/iptraf-ng
28 SECTION:=net
29 CATEGORY:=Network
30 DEPENDS:=+libncurses
31 TITLE:=A console-based network monitoring program
32 URL:=https://infrastructure.fedoraproject.org/infra/hosted-content/iptraf-ng/
33endef
34
35define Package/iptraf-ng/description
36 iptraf-ng is a console-based network statistics utility for Linux. It gathers a
37 variety of figures such as TCP connection packet and byte counts, interface
38 statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN
39 station packet and byte counts.
40endef
41
42define Package/iptraf-ng/postinst
43#!/bin/sh
44if [ -z "$${IPKG_INSTROOT}" ]; then
45 mkdir -p $${IPKG_INSTROOT}/var/log/iptraf-ng \
46 $${IPKG_INSTROOT}/var/run/iptraf-ng \
47 $${IPKG_INSTROOT}/var/lib/iptraf-ng
48fi
49endef
50
51MAKE_FLAGS += \
52 CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \
53 CPPFLAGS="$(TARGET_CPPFLAGS) -D_GNU_SOURCE" \
54 NCURSES_CFLAGS="$(TARGET_CFLAGS)" \
55 NCURSES_LDFLAGS="$(TARGET_LDFLAGS) -lncurses -lpanel" \
56 iptraf-ng rvnamed-ng
57
58define Package/iptraf-ng/install
59 $(INSTALL_DIR) $(1)/usr/bin
60 $(INSTALL_BIN) $(PKG_BUILD_DIR)/iptraf-ng $(1)/usr/bin/
61 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rvnamed-ng $(1)/usr/bin/
62endef
63
64$(eval $(call BuildPackage,iptraf-ng))