port libao to buildroot-ng
[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:=2006-04-R1
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://www.kismetwireless.net/code
18 PKG_MD5SUM:=8ec2de513f2911df1b7edfcba5ad1c26
19 PKG_CAT:=zcat
20
21 PKG_BUILDDEP:=libpcap ncurses uclibc++
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/kismet-client
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=Kismet client
29 DEPENDS:=+libncurses +uclibc++
30 DESCRIPTION:=Kismet client.\\\
31 An 802.11 layer2 wireless network detector, sniffer, and intrusion \\\
32 detection system.\\\
33 \\\
34 This package contains the kismet text interface client.
35 URL:=http://www.kismetwireless.net/
36 endef
37
38 define Package/kismet-client/conffiles
39 /etc/kismet/ap_manuf
40 /etc/kismet/client_manuf
41 /etc/kismet/kismet.conf
42 /etc/kismet/kismet_ui.conf
43 endef
44
45 define Package/kismet-drone
46 SECTION:=net
47 CATEGORY:=Network
48 DEPENDS:=+libpcap +uclibc++
49 TITLE:=Kismet drone
50 DESCRIPTION:=Kismet drone.\\\
51 An 802.11 layer2 wireless network detector, sniffer, and intrusion \\\
52 detection system.\\\
53 \\\
54 This package contains the kismet remote sniffing.and monitoring drone.
55 URL:=http://www.kismetwireless.net/
56 endef
57
58 define Package/kismet-drone/conffiles
59 /etc/kismet/kismet_drone.conf
60 endef
61
62 define Package/kismet-server
63 SECTION:=net
64 CATEGORY:=Network
65 DEPENDS:=+libpcap +uclibc++
66 TITLE:=Kismet server
67 DESCRIPTION:=Kismet server.\\\
68 An 802.11 layer2 wireless network detector, sniffer, and intrusion \\\
69 detection system.\\\
70 \\\
71 This package contains the kismet server.
72 URL:=http://www.kismetwireless.net/
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 Build/Configure
82 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
83 $(TARGET_CONFIGURE_OPTS) \
84 CFLAGS="$(TARGET_CFLAGS)" \
85 CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \
86 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(LINUX_DIR)/include" \
87 LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
88 LIBS="-luClibc++ -lc -lm -lgcc" \
89 ./configure \
90 --target=$(GNU_TARGET_NAME) \
91 --host=$(GNU_TARGET_NAME) \
92 --build=$(GNU_HOST_NAME) \
93 --program-prefix="" \
94 --program-suffix="" \
95 --prefix=/usr \
96 --exec-prefix=/usr \
97 --bindir=/usr/bin \
98 --datadir=/usr/share \
99 --includedir=/usr/include \
100 --infodir=/usr/share/info \
101 --libdir=/usr/lib \
102 --libexecdir=/usr/lib \
103 --localstatedir=/var \
104 --mandir=/usr/share/man \
105 --sbindir=/usr/sbin \
106 --sysconfdir=/etc/kismet \
107 $(DISABLE_LARGEFILE) \
108 $(DISABLE_NLS) \
109 --enable-syspcap=yes \
110 --disable-setuid \
111 --disable-wsp100 \
112 --disable-gpsmap \
113 );
114 endef
115
116 define Build/Compile
117 $(MAKE) -C $(PKG_BUILD_DIR) \
118 LIBS="-luClibc++ -lc -lm -lgcc" \
119 all
120 endef
121
122 #FIXME: remove this package?
123 define Package/kismet/install
124 install -d -m0755 $(1)/usr/bin/
125 install -m0755 $(PKG_BUILD_DIR)/scripts/kismet $(1)/usr/bin/kismet
126 endef
127
128 define Package/kismet-client/install
129 install -d -m0755 $(1)/etc/kismet/
130 install -m0644 ./files/ap_manuf $(1)/etc/kismet/
131 install -m0644 ./files/client_manuf $(1)/etc/kismet/
132 install -m0644 ./files/kismet.conf $(1)/etc/kismet/
133 install -m0644 ./files/kismet_ui.conf $(1)/etc/kismet/
134 install -d -m0755 $(1)/usr/bin
135 install -m0755 $(PKG_BUILD_DIR)/kismet_client $(1)/usr/bin/
136 endef
137
138 define Package/kismet-drone/install
139 install -d -m0755 $(1)/etc/kismet/
140 install -m0644 ./files/kismet_drone.conf $(1)/etc/kismet/
141 install -d -m0755 $(1)/usr/bin
142 install -m0755 $(PKG_BUILD_DIR)/kismet_drone $(1)/usr/bin/
143 endef
144
145 define Package/kismet-server/install
146 install -d -m0755 $(1)/etc/kismet/
147 install -m0644 ./files/ap_manuf $(1)/etc/kismet/
148 install -m0644 ./files/client_manuf $(1)/etc/kismet/
149 install -m0644 ./files/kismet.conf $(1)/etc/kismet/
150 install -d -m0755 $(1)/usr/bin
151 install -m0755 $(PKG_BUILD_DIR)/kismet_server $(1)/usr/bin/
152 endef
153
154 $(eval $(call BuildPackage,kismet-client))
155 $(eval $(call BuildPackage,kismet-drone))
156 $(eval $(call BuildPackage,kismet-server))