kismet: fix dependency issues
[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
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
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 +libcap
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 +libcap
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 -lc -luClibc++ -lm $(LIBGCC_S)"
90
91 define Build/Compile
92 $(MAKE) -C $(PKG_BUILD_DIR) \
93 LD="$(TARGET_CXX)" \
94 all
95 endef
96
97 #FIXME: remove this package?
98 define Package/kismet/install
99 $(INSTALL_DIR) $(1)/usr/bin/
100 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/kismet $(1)/usr/bin/kismet
101 endef
102
103 define Package/kismet-client/install
104 $(INSTALL_DIR) $(1)/etc/kismet/
105 $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet.conf $(1)/etc/kismet/
106 $(INSTALL_DIR) $(1)/usr/bin
107 $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_client $(1)/usr/bin/
108 endef
109
110 define Package/kismet-drone/install
111 $(INSTALL_DIR) $(1)/etc/kismet/
112 $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet_drone.conf $(1)/etc/kismet/
113 $(INSTALL_DIR) $(1)/usr/bin
114 $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_drone $(1)/usr/bin/
115 endef
116
117 define Package/kismet-server/install
118 $(INSTALL_DIR) $(1)/etc/kismet/
119 $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet.conf $(1)/etc/kismet/
120 $(INSTALL_DIR) $(1)/usr/bin
121 $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_server $(1)/usr/bin/
122 endef
123
124 $(eval $(call BuildPackage,kismet-client))
125 $(eval $(call BuildPackage,kismet-drone))
126 $(eval $(call BuildPackage,kismet-server))