[packages] Mass Fix for GCC 4.6
[openwrt/svn-archive/archive.git] / net / kismet / Makefile
1 #
2 # Copyright (C) 2006-2010 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:=2010-07-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:=85e59186eb529889118b5635f35cf57d
17
18 PKG_BUILD_DEPENDS:=libpcap libncurses uclibcxx libpcre libnl-tiny
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 +libnl-tiny
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/kismet.conf
44 endef
45
46 define Package/kismet-client/description
47 $(call Package/kismet/Default/description)
48 This package contains the kismet text interface client.
49 endef
50
51 define Package/kismet-drone
52 $(call Package/kismet/Default)
53 DEPENDS+= +libpcap +libpcre
54 TITLE+= drone
55 endef
56
57 define Package/kismet-drone/conffiles
58 /etc/kismet/kismet_drone.conf
59 endef
60
61 define Package/kismet-drone/description
62 $(call Package/kismet/Default/description)
63 This package contains the kismet remote sniffing.and monitoring drone.
64 endef
65
66 define Package/kismet-server
67 $(call Package/kismet/Default)
68 DEPENDS+= +libpcap +libpcre
69 TITLE+= server
70 endef
71
72 define Package/kismet-server/conffiles
73 /etc/kismet/kismet.conf
74 endef
75
76 define Package/kismet-server/description
77 $(call Package/kismet/Default/description)
78 This package contains the kismet server.
79 endef
80
81 CONFIGURE_ARGS += \
82 --sysconfdir=/etc/kismet \
83
84 CONFIGURE_VARS += \
85 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
86 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
87 LDFLAGS="$$$$LDFLAGS" \
88 LIBS="-nodefaultlibs -lc -luClibc++ -lm $(LIBGCC_S)" \
89 CLIENTCLIBS="-nodefaultlibs -luClibc++ -lm $(LIBGCC_S)" \
90 libnl1_LIBS="-libnl-tiny"
91
92 define Build/Compile
93 $(MAKE) -C $(PKG_BUILD_DIR) \
94 LD="$(TARGET_CXX)" \
95 all
96 endef
97
98 #FIXME: remove this package?
99 define Package/kismet/install
100 $(INSTALL_DIR) $(1)/usr/bin/
101 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/kismet $(1)/usr/bin/kismet
102 endef
103
104 define Package/kismet-client/install
105 $(INSTALL_DIR) $(1)/etc/kismet/
106 $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet.conf $(1)/etc/kismet/
107 $(INSTALL_DIR) $(1)/usr/bin
108 $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_client $(1)/usr/bin/
109 endef
110
111 define Package/kismet-drone/install
112 $(INSTALL_DIR) $(1)/etc/kismet/
113 $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet_drone.conf $(1)/etc/kismet/
114 $(INSTALL_DIR) $(1)/usr/bin
115 $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_drone $(1)/usr/bin/
116 endef
117
118 define Package/kismet-server/install
119 $(INSTALL_DIR) $(1)/etc/kismet/
120 $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet.conf $(1)/etc/kismet/
121 $(INSTALL_DIR) $(1)/usr/bin
122 $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_server $(1)/usr/bin/
123 endef
124
125 $(eval $(call BuildPackage,kismet-client))
126 $(eval $(call BuildPackage,kismet-drone))
127 $(eval $(call BuildPackage,kismet-server))