4b691b1c400ee1fdf72fcb0ccbd965348a633700
[openwrt/svn-archive/archive.git] / net / kismet / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=kismet
11 PKG_VERSION:=2009-06-R1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.kismetwireless.net/code
16 PKG_MD5SUM:=8d77138020ace39f175a906dc0d3b267
17
18 PKG_BUILD_DEPENDS:=libpcap libncurses uclibcxx
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/kismet/Default
23 SECTION:=net
24 CATEGORY:=Network
25 TITLE:=Kismet
26 DEPENDS:= +uclibcxx
27 URL:=http://www.kismetwireless.net/
28 SUBMENU:=wireless
29 endef
30
31 define Package/kismet/Default/description
32 An 802.11 layer2 wireless network detector, sniffer, and intrusion
33 detection system.
34 endef
35
36 define Package/kismet-client
37 $(call Package/kismet/Default)
38 TITLE+= client
39 DEPENDS+= +libncurses
40 endef
41
42 define Package/kismet-client/conffiles
43 /etc/kismet/ap_manuf
44 /etc/kismet/client_manuf
45 /etc/kismet/kismet.conf
46 /etc/kismet/kismet_ui.conf
47 endef
48
49 define Package/kismet-client/description
50 $(call Package/kismet/Default/description)
51 This package contains the kismet text interface client.
52 endef
53
54 define Package/kismet-drone
55 $(call Package/kismet/Default)
56 DEPENDS+= +libpcap +dbus
57 TITLE+= drone
58 endef
59
60 define Package/kismet-drone/conffiles
61 /etc/kismet/kismet_drone.conf
62 endef
63
64 define Package/kismet-drone/description
65 $(call Package/kismet/Default/description)
66 This package contains the kismet remote sniffing.and monitoring drone.
67 endef
68
69 define Package/kismet-server
70 $(call Package/kismet/Default)
71 DEPENDS+= +libpcap +dbus
72 TITLE+= server
73 endef
74
75 define Package/kismet-server/conffiles
76 /etc/kismet/ap_manuf
77 /etc/kismet/client_manuf
78 /etc/kismet/kismet.conf
79 endef
80
81 define Package/kismet-server/description
82 $(call Package/kismet/Default/description)
83 This package contains the kismet server.
84 endef
85
86 CONFIGURE_ARGS += \
87 --sysconfdir=/etc/kismet \
88
89 CONFIGURE_VARS += \
90 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
91 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
92 LDFLAGS="$$$$LDFLAGS" \
93 LIBS="-nodefaultlibs -luClibc++ -lm -lgcc" \
94 CLIENTLIBS="-nodefaultlibs -luClibc++ -lm -lgcc" \
95
96 define Build/Compile
97 $(MAKE) -C $(PKG_BUILD_DIR) \
98 LD="$(TARGET_CXX)" \
99 all
100 endef
101
102 #FIXME: remove this package?
103 define Package/kismet/install
104 $(INSTALL_DIR) $(1)/usr/bin/
105 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/kismet $(1)/usr/bin/kismet
106 endef
107
108 define Package/kismet-client/install
109 $(INSTALL_DIR) $(1)/etc/kismet/
110 $(INSTALL_DATA) ./files/ap_manuf $(1)/etc/kismet/
111 $(INSTALL_DATA) ./files/client_manuf $(1)/etc/kismet/
112 $(INSTALL_DATA) ./files/kismet.conf $(1)/etc/kismet/
113 $(INSTALL_DATA) ./files/kismet_ui.conf $(1)/etc/kismet/
114 $(INSTALL_DIR) $(1)/usr/bin
115 $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_client $(1)/usr/bin/
116 endef
117
118 define Package/kismet-drone/install
119 $(INSTALL_DIR) $(1)/etc/kismet/
120 $(INSTALL_DATA) ./files/kismet_drone.conf $(1)/etc/kismet/
121 $(INSTALL_DIR) $(1)/usr/bin
122 $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_drone $(1)/usr/bin/
123 endef
124
125 define Package/kismet-server/install
126 $(INSTALL_DIR) $(1)/etc/kismet/
127 $(INSTALL_DATA) ./files/ap_manuf $(1)/etc/kismet/
128 $(INSTALL_DATA) ./files/client_manuf $(1)/etc/kismet/
129 $(INSTALL_DATA) ./files/kismet.conf $(1)/etc/kismet/
130 $(INSTALL_DIR) $(1)/usr/bin
131 $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_server $(1)/usr/bin/
132 endef
133
134 $(eval $(call BuildPackage,kismet-client))
135 $(eval $(call BuildPackage,kismet-drone))
136 $(eval $(call BuildPackage,kismet-server))