Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #
  2. # Copyright (C) 2012 Jo-Philipp Wich <jow@openwrt.org>
  3. #
  4. # This is free software, licensed under the Apache 2 license.
  5. #
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=iwcap
  8. PKG_RELEASE:=1
  9. PKG_LICENSE:=Apache-2.0
  10. include $(INCLUDE_DIR)/package.mk
  11. define Package/iwcap
  12. SECTION:=utils
  13. CATEGORY:=Utilities
  14. TITLE:=Simple radiotap capture utility
  15. MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
  16. endef
  17. define Package/iwcap/description
  18. The iwcap utility receives radiotap packet data from wifi monitor interfaces
  19. and outputs it to pcap format. It gathers recived packets in a fixed ring
  20. buffer to dump them on demand which is useful for background monitoring.
  21. Alternatively the utility can stream the data to stdout to act as remote
  22. capture drone for Wireshark or similar programs.
  23. endef
  24. define Build/Prepare
  25. $(INSTALL_DIR) $(PKG_BUILD_DIR)
  26. $(CP) ./src/* $(PKG_BUILD_DIR)/
  27. endef
  28. define Build/Configure
  29. endef
  30. define Build/Compile
  31. $(TARGET_CC) $(TARGET_CFLAGS) \
  32. -o $(PKG_BUILD_DIR)/iwcap $(PKG_BUILD_DIR)/iwcap.c
  33. endef
  34. define Package/iwcap/install
  35. $(INSTALL_DIR) $(1)/usr/sbin
  36. $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwcap $(1)/usr/sbin/iwcap
  37. endef
  38. $(eval $(call BuildPackage,iwcap))