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.

69 lines
2.2 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=netsniff-ng
  3. PKG_VERSION:=0.6.7
  4. PKG_RELEASE:=1
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://codeload.github.com/netsniff-ng/netsniff-ng/tar.gz/v$(PKG_VERSION)?
  7. PKG_HASH:=030b0554206b43c5883e48a63575fb65d7835e275333372f55f7d615d419da05
  8. PKG_MAINTAINER:=Toni Uhlig <matzeton@googlemail.com>
  9. PKG_LICENSE:=GPL-2.0-or-later
  10. PKG_LICENSE_FILES:=COPYING
  11. PKG_USE_MIPS16:=0
  12. PKG_BUILD_PARALLEL:=1
  13. include $(INCLUDE_DIR)/package.mk
  14. define Package/netsniff-ng
  15. SECTION:=net
  16. CATEGORY:=Network
  17. DEPENDS:=+libpthread +libpcap +libncurses +zlib +liburcu +libsodium +libnetfilter-conntrack
  18. TITLE:=netsniff-ng
  19. URL:=https://github.com/netsniff-ng/netsniff-ng
  20. endef
  21. define Package/netsniff-ng/description
  22. netsniff-ng is a free, performant Linux network analyzer and
  23. networking toolkit. If you will, the Swiss army knife for network
  24. packets.
  25. endef
  26. define Build/Configure
  27. ( cd $(PKG_BUILD_DIR); \
  28. CC="$(TARGET_CC)" \
  29. LD="$(TARGET_LD)" \
  30. CFLAGS="$(TARGET_CFLAGS)" \
  31. LDFLAGS="$(TARGET_LDFLAGS)" \
  32. CROSS_COMPILE="$(REAL_GNU_TARGET_NAME)-" \
  33. ./configure --prefix=/usr --disable-geoip --disable-libnl )
  34. endef
  35. define Build/Compile
  36. $(MAKE) -C $(PKG_BUILD_DIR) Q= \
  37. CC="$(TARGET_CC)" \
  38. LD="$(TARGET_LD)" \
  39. CFLAGS="$(TARGET_CFLAGS)" \
  40. LDFLAGS="$(TARGET_LDFLAGS)" \
  41. CROSS_COMPILE="$(REAL_GNU_TARGET_NAME)-"
  42. endef
  43. define Package/netsniff-ng/install
  44. $(INSTALL_DIR) $(1)/etc/netsniff-ng
  45. $(INSTALL_DIR) $(1)/usr/sbin
  46. $(CP) $(PKG_BUILD_DIR)/ether.conf $(1)/etc/netsniff-ng
  47. $(CP) $(PKG_BUILD_DIR)/tcp.conf $(1)/etc/netsniff-ng
  48. $(CP) $(PKG_BUILD_DIR)/udp.conf $(1)/etc/netsniff-ng
  49. $(CP) $(PKG_BUILD_DIR)/oui.conf $(1)/etc/netsniff-ng
  50. $(INSTALL_BIN) $(PKG_BUILD_DIR)/netsniff-ng/netsniff-ng $(1)/usr/sbin/
  51. $(INSTALL_BIN) $(PKG_BUILD_DIR)/trafgen/trafgen $(1)/usr/sbin/
  52. $(INSTALL_BIN) $(PKG_BUILD_DIR)/astraceroute/astraceroute $(1)/usr/sbin/
  53. $(INSTALL_BIN) $(PKG_BUILD_DIR)/flowtop/flowtop $(1)/usr/sbin/
  54. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ifpps/ifpps $(1)/usr/sbin/
  55. $(INSTALL_BIN) $(PKG_BUILD_DIR)/bpfc/bpfc $(1)/usr/sbin/
  56. $(INSTALL_BIN) $(PKG_BUILD_DIR)/curvetun/curvetun $(1)/usr/sbin/
  57. endef
  58. $(eval $(call BuildPackage,netsniff-ng))