You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.7 KiB

  1. #
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=iptraf-ng
  9. PKG_VERSION:=1.1.4
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://infrastructure.fedoraproject.org/infra/hosted-content/$(PKG_NAME)/$(PKG_NAME)
  13. PKG_HASH:=79140cf07c0cceb1b5723242847a73aa86f5e4f9dccfe8970fda6801d347eb09
  14. PKG_LICENSE:=GPL-2.0
  15. PKG_LICENSE_FILES:=LICENSE
  16. PKG_MAINTAINER:=
  17. PKG_CHECK_FORMAT_SECURITY:=0
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/iptraf-ng
  20. SECTION:=net
  21. CATEGORY:=Network
  22. DEPENDS:=+libncurses
  23. TITLE:=A console-based network monitoring program
  24. URL:=https://infrastructure.fedoraproject.org/infra/hosted-content/iptraf-ng/
  25. endef
  26. define Package/iptraf-ng/description
  27. iptraf-ng is a console-based network statistics utility for Linux. It gathers a
  28. variety of figures such as TCP connection packet and byte counts, interface
  29. statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN
  30. station packet and byte counts.
  31. endef
  32. define Package/iptraf-ng/postinst
  33. #!/bin/sh
  34. if [ -z "$${IPKG_INSTROOT}" ]; then
  35. mkdir -p $${IPKG_INSTROOT}/var/log/iptraf-ng \
  36. $${IPKG_INSTROOT}/var/run/iptraf-ng \
  37. $${IPKG_INSTROOT}/var/lib/iptraf-ng
  38. fi
  39. endef
  40. MAKE_FLAGS += \
  41. CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \
  42. CPPFLAGS="$(TARGET_CPPFLAGS) -D_GNU_SOURCE" \
  43. NCURSES_CFLAGS="$(TARGET_CFLAGS)" \
  44. NCURSES_LDFLAGS="$(TARGET_LDFLAGS) -lncurses -lpanel" \
  45. iptraf-ng rvnamed-ng
  46. define Package/iptraf-ng/install
  47. $(INSTALL_DIR) $(1)/usr/bin
  48. $(INSTALL_BIN) $(PKG_BUILD_DIR)/iptraf-ng $(1)/usr/bin/
  49. $(INSTALL_BIN) $(PKG_BUILD_DIR)/rvnamed-ng $(1)/usr/bin/
  50. endef
  51. $(eval $(call BuildPackage,iptraf-ng))