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