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