packages/net/kismet: update to version 2010-01-R1
[openwrt/svn-archive/archive.git] / net / kismet / Makefile
index 2484850ccaf15aa2e78d1b5fae36941eab948828..b762a9b1d158c4927422ab87cf9f98b68fadeb05 100644 (file)
 # 
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=kismet
-PKG_VERSION:=2006-04-R1
+PKG_VERSION:=2010-01-R1
 PKG_RELEASE:=1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.kismetwireless.net/code
-PKG_MD5SUM:=8ec2de513f2911df1b7edfcba5ad1c26
-PKG_CAT:=zcat
+PKG_MD5SUM:=a6d6edcf65d5bb2cb5de6472bcc16f19
 
-PKG_BUILDDEP:=libpcap libncurses uclibcxx
+PKG_BUILD_DEPENDS:=libpcap libncurses uclibcxx libpcre
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/kismet-client
+define Package/kismet/Default
   SECTION:=net
   CATEGORY:=Network
-  TITLE:=Kismet client
-  DEPENDS:=+libncurses +uclibc++
-  DESCRIPTION:=Kismet client.\\\
-    An 802.11 layer2 wireless network detector, sniffer, and intrusion \\\
-    detection system.\\\
-    \\\
-    This package contains the kismet text interface client.
+  TITLE:=Kismet
+  DEPENDS:= +uclibcxx
   URL:=http://www.kismetwireless.net/
+  SUBMENU:=wireless
+endef
+
+define Package/kismet/Default/description
+ An 802.11 layer2 wireless network detector, sniffer, and intrusion
+ detection system.
+endef
+
+define Package/kismet-client
+$(call Package/kismet/Default)
+  TITLE+= client
+  DEPENDS+= +libncurses
 endef
 
 define Package/kismet-client/conffiles
-/etc/kismet/ap_manuf
-/etc/kismet/client_manuf
 /etc/kismet/kismet.conf
-/etc/kismet/kismet_ui.conf
+endef
+
+define Package/kismet-client/description
+$(call Package/kismet/Default/description)
+ This package contains the kismet text interface client.
 endef
 
 define Package/kismet-drone
-  SECTION:=net
-  CATEGORY:=Network
-  DEPENDS:=+libpcap +uclibc++
-  TITLE:=Kismet drone
-  DESCRIPTION:=Kismet drone.\\\
-    An 802.11 layer2 wireless network detector, sniffer, and intrusion \\\
-    detection system.\\\
-    \\\
-    This package contains the kismet remote sniffing.and monitoring drone.
-  URL:=http://www.kismetwireless.net/
+$(call Package/kismet/Default)
+  DEPENDS+= +libpcap +libpcre
+  TITLE+= drone
 endef
 
 define Package/kismet-drone/conffiles
 /etc/kismet/kismet_drone.conf
 endef
 
+define Package/kismet-drone/description
+$(call Package/kismet/Default/description)
+ This package contains the kismet remote sniffing.and monitoring drone.
+endef
+
 define Package/kismet-server
-  SECTION:=net
-  CATEGORY:=Network
-  DEPENDS:=+libpcap +uclibc++
-  TITLE:=Kismet server
-  DESCRIPTION:=Kismet server.\\\
-    An 802.11 layer2 wireless network detector, sniffer, and intrusion \\\
-    detection system.\\\
-    \\\
-    This package contains the kismet server.
-  URL:=http://www.kismetwireless.net/
+$(call Package/kismet/Default)
+  DEPENDS+= +libpcap +libpcre
+  TITLE+= server
 endef
 
 define Package/kismet-server/conffiles
-/etc/kismet/ap_manuf
-/etc/kismet/client_manuf
 /etc/kismet/kismet.conf
 endef
 
-define Build/Configure
-       (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
-               $(TARGET_CONFIGURE_OPTS) \
-               CFLAGS="$(TARGET_CFLAGS)"  \
-               CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++"  \
-               CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(LINUX_DIR)/include" \
-               LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
-               LIBS="-luClibc++ -lc -lm -lgcc" \
-               ./configure \
-                       --target=$(GNU_TARGET_NAME) \
-                       --host=$(GNU_TARGET_NAME) \
-                       --build=$(GNU_HOST_NAME) \
-                       --program-prefix="" \
-                       --program-suffix="" \
-                       --prefix=/usr \
-                       --exec-prefix=/usr \
-                       --bindir=/usr/bin \
-                       --datadir=/usr/share \
-                       --includedir=/usr/include \
-                       --infodir=/usr/share/info \
-                       --libdir=/usr/lib \
-                       --libexecdir=/usr/lib \
-                       --localstatedir=/var \
-                       --mandir=/usr/share/man \
-                       --sbindir=/usr/sbin \
-                       --sysconfdir=/etc/kismet \
-                       $(DISABLE_LARGEFILE) \
-                       $(DISABLE_NLS) \
-                       --enable-syspcap=yes \
-                       --disable-setuid \
-                       --disable-wsp100 \
-                       --disable-gpsmap \
-       );
+define Package/kismet-server/description
+$(call Package/kismet/Default/description)
+ This package contains the kismet server.
 endef
 
+CONFIGURE_ARGS += \
+       --sysconfdir=/etc/kismet \
+
+CONFIGURE_VARS += \
+       CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
+       CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
+       LDFLAGS="$$$$LDFLAGS" \
+       LIBS="-nodefaultlibs -luClibc++ -lm -lgcc" \
+       CLIENTCLIBS="-nodefaultlibs -luClibc++ -lm -lgcc" \
+
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
-               LIBS="-luClibc++ -lc -lm -lgcc" \
+               LD="$(TARGET_CXX)" \
                all
 endef
 
 #FIXME: remove this package?
 define Package/kismet/install
-       install -d -m0755 $(1)/usr/bin/
-       install -m0755 $(PKG_BUILD_DIR)/scripts/kismet $(1)/usr/bin/kismet
+       $(INSTALL_DIR) $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/kismet $(1)/usr/bin/kismet
 endef
 
 define Package/kismet-client/install
-       install -d -m0755 $(1)/etc/kismet/
-       install -m0644 ./files/ap_manuf $(1)/etc/kismet/
-       install -m0644 ./files/client_manuf $(1)/etc/kismet/
-       install -m0644 ./files/kismet.conf $(1)/etc/kismet/
-       install -m0644 ./files/kismet_ui.conf $(1)/etc/kismet/
-       install -d -m0755 $(1)/usr/bin
-       install -m0755 $(PKG_BUILD_DIR)/kismet_client $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc/kismet/
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet.conf $(1)/etc/kismet/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_client $(1)/usr/bin/
 endef
 
 define Package/kismet-drone/install
-       install -d -m0755 $(1)/etc/kismet/
-       install -m0644 ./files/kismet_drone.conf $(1)/etc/kismet/
-       install -d -m0755 $(1)/usr/bin
-       install -m0755 $(PKG_BUILD_DIR)/kismet_drone $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc/kismet/
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet_drone.conf $(1)/etc/kismet/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_drone $(1)/usr/bin/
 endef
 
 define Package/kismet-server/install
-       install -d -m0755 $(1)/etc/kismet/
-       install -m0644 ./files/ap_manuf $(1)/etc/kismet/
-       install -m0644 ./files/client_manuf $(1)/etc/kismet/
-       install -m0644 ./files/kismet.conf $(1)/etc/kismet/
-       install -d -m0755 $(1)/usr/bin
-       install -m0755 $(PKG_BUILD_DIR)/kismet_server $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc/kismet/
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet.conf $(1)/etc/kismet/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_server $(1)/usr/bin/
 endef
 
 $(eval $(call BuildPackage,kismet-client))