[packages] kismet: drop old atan patch, add new patch to properly link against libm...
[packages.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
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         --enable-syspcap=yes \
89         --disable-dbus \
90         --disable-setuid \
91         --disable-wsp100 \
92         --disable-gpsmap \
93
94 CONFIGURE_VARS += \
95         CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
96         CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
97         LDFLAGS="$$$$LDFLAGS" \
98         LIBS="-nodefaultlibs -luClibc++ -lm -lgcc" \
99         CLIENTLIBS="-nodefaultlibs -luClibc++ -lm -lgcc" \
100
101 define Build/Compile
102         $(MAKE) -C $(PKG_BUILD_DIR) \
103                 LD="$(TARGET_CXX)" \
104                 all
105 endef
106
107 #FIXME: remove this package?
108 define Package/kismet/install
109         $(INSTALL_DIR) $(1)/usr/bin/
110         $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/kismet $(1)/usr/bin/kismet
111 endef
112
113 define Package/kismet-client/install
114         $(INSTALL_DIR) $(1)/etc/kismet/
115         $(INSTALL_DATA) ./files/ap_manuf $(1)/etc/kismet/
116         $(INSTALL_DATA) ./files/client_manuf $(1)/etc/kismet/
117         $(INSTALL_DATA) ./files/kismet.conf $(1)/etc/kismet/
118         $(INSTALL_DATA) ./files/kismet_ui.conf $(1)/etc/kismet/
119         $(INSTALL_DIR) $(1)/usr/bin
120         $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_client $(1)/usr/bin/
121 endef
122
123 define Package/kismet-drone/install
124         $(INSTALL_DIR) $(1)/etc/kismet/
125         $(INSTALL_DATA) ./files/kismet_drone.conf $(1)/etc/kismet/
126         $(INSTALL_DIR) $(1)/usr/bin
127         $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_drone $(1)/usr/bin/
128 endef
129
130 define Package/kismet-server/install
131         $(INSTALL_DIR) $(1)/etc/kismet/
132         $(INSTALL_DATA) ./files/ap_manuf $(1)/etc/kismet/
133         $(INSTALL_DATA) ./files/client_manuf $(1)/etc/kismet/
134         $(INSTALL_DATA) ./files/kismet.conf $(1)/etc/kismet/
135         $(INSTALL_DIR) $(1)/usr/bin
136         $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_server $(1)/usr/bin/
137 endef
138
139 $(eval $(call BuildPackage,kismet-client))
140 $(eval $(call BuildPackage,kismet-drone))
141 $(eval $(call BuildPackage,kismet-server))