diff options
author | Gustavo Zacarias <gustavo@zacarias.com.ar> | 2009-09-01 14:01:40 -0300 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2009-09-09 16:40:19 +0200 |
commit | 57f3b11d111fb5f7fd48d64a43a83e25d69bdb4c (patch) | |
tree | 87c9f8cee5b268a0bd70bdaa8ac2162da2862270 /package/kismet/kismet.mk | |
parent | 8c1189587654cac752d920ac37730afac0c758a7 (diff) |
kismet: bump version and convert to Makefile.autotools.in format
Closes #487
* Bump kismet from 2007-10-R1 to 2009-06-R1 (newcore: nicer, more features)
* Migrate to Makefile.autotools.in
* Introduce new options to just install the server, client, drone or
combination
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/kismet/kismet.mk')
-rw-r--r-- | package/kismet/kismet.mk | 107 |
1 files changed, 35 insertions, 72 deletions
diff --git a/package/kismet/kismet.mk b/package/kismet/kismet.mk index 7b9c0dd28..edc46e41d 100644 --- a/package/kismet/kismet.mk +++ b/package/kismet/kismet.mk @@ -3,83 +3,46 @@ # kismet # ############################################################# -KISMET_VERSION:=2007-10-R1 -KISMET_SOURCE:=kismet-$(KISMET_VERSION).tar.gz -KISMET_SITE:=http://www.kismetwireless.net/code/ -KISMET_DIR:=$(BUILD_DIR)/kismet-$(KISMET_VERSION) -KISMET_CAT:=$(ZCAT) -KISMET_BINARY:=kismet -KISMET_TARGET_DIRECTORY=usr/bin/ -$(DL_DIR)/$(KISMET_SOURCE): - $(call DOWNLOAD,$(KISMET_SITE),$(KISMET_SOURCE)) +KISMET_VERSION = 2009-06-R1 +KISMET_SOURCE = kismet-$(KISMET_VERSION).tar.gz +KISMET_SITE = http://www.kismetwireless.net/code +KISMET_DEPENDENCIES = libpcap ncurses -kismet-source: $(DL_DIR)/$(KISMET_SOURCE) - -$(KISMET_DIR)/.patched: $(DL_DIR)/$(KISMET_SOURCE) - $(KISMET_CAT) $(DL_DIR)/$(KISMET_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(KISMET_DIR) package/kismet/ kismet\*.patch - touch $@ - -$(KISMET_DIR)/.configured: $(KISMET_DIR)/.patched - (cd $(KISMET_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - DBUS_CFLAGS="-I$(STAGING_DIR)/usr/include/dbus-1.0 -I$(STAGING_DIR)/usr/lib/dbus-1.0/include" \ - DBUS_LIBS="$(STAGING_DIR)/usr/lib/libdbus-1.so" \ - DBUS_GLIB_CFLAGS="-I$(STAGING_DIR)/usr/include/glib-2.0 -I$(STAGING_DIR)/usr/lib/glib-2.0/include" \ - DBUS_GLIB_LIBS="$(STAGING_DIR)/lib/libglib-2.0.so $(STAGING_DIR)/lib/libgobject-2.0.so $(STAGING_DIR)/lib/libgmodule-2.0.so $(STAGING_DIR)/lib/libgthread-2.0.so" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --libdir=/lib \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - $(DISABLE_LARGEFILE) \ - ) - touch $@ - -$(KISMET_DIR)/$(KISMET_BINARY): $(KISMET_DIR)/.configured - $(MAKE) CXX="$(TARGET_CXX)" CC="$(TARGET_CC)" \ - -C $(KISMET_DIR) - -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(KISMET_DIR)/kismet - -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(KISMET_DIR)/kismet_client - -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(KISMET_DIR)/kismet_drone - -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(KISMET_DIR)/kismet_server - -$(TARGET_DIR)/$(KISMET_TARGET_DIRECTORY)/$(KISMET_BINARY): $(KISMET_DIR)/$(KISMET_BINARY) - install -m 755 $(KISMET_DIR)/kismet $(TARGET_DIR)/$(KISMET_TARGET_DIRECTORY)/kismet - install -m 755 $(KISMET_DIR)/kismet_client $(TARGET_DIR)/$(KISMET_TARGET_DIRECTORY)/kismet_client - install -m 755 $(KISMET_DIR)/kismet_drone $(TARGET_DIR)/$(KISMET_TARGET_DIRECTORY)/kismet_drone - install -m 755 $(KISMET_DIR)/kismet_server $(TARGET_DIR)/$(KISMET_TARGET_DIRECTORY)/kismet_server - install -m 755 $(KISMET_DIR)/conf/kismet.conf $(TARGET_DIR)/etc/kismet.conf +ifeq ($(BR2_PACKAGE_LIBNL),y) + KISMET_DEPENDENCIES += libnl +endif +ifeq ($(BR2_PACKAGE_PCRE),y) + KISMET_DEPENDENCIES += pcre +endif -kismet: ncurses libpcap dbus $(TARGET_DIR)/$(KISMET_TARGET_DIRECTORY)/$(KISMET_BINARY) +ifeq ($(BR2_PACKAGE_KISMET_CLIENT),y) + KISMET_TARGET_BINARIES += kismet_client +endif -kismet-unpacked: $(KISMET_DIR)/.patched +ifeq ($(BR2_PACKAGE_KISMET_SERVER),y) + KISMET_TARGET_BINARIES += kismet_server + KISMET_TARGET_CONFIGS += kismet.conf +endif -kismet-clean: - rm -f $(TARGET_DIR)/$(KISMET_TARGET_DIRECTORY)/kismet - rm -f $(TARGET_DIR)/$(KISMET_TARGET_DIRECTORY)/kismet_client - rm -f $(TARGET_DIR)/$(KISMET_TARGET_DIRECTORY)/kismet_drone - rm -f $(TARGET_DIR)/$(KISMET_TARGET_DIRECTORY)/kismet_server - rm -f $(KISMET_DIR)/conf/kismet.conf $(TARGET_DIR)/etc/kismet.conf - -$(MAKE) -C $(KISMET_DIR) clean +ifeq ($(BR2_PACKAGE_KISMET_DRONE),y) + KISMET_TARGET_BINARIES += kismet_drone + KISMET_TARGET_CONFIGS += kismet_drone.conf +endif -kismet-dirclean: - rm -rf $(KISMET_DIR) +$(eval $(call AUTOTARGETS,package,kismet)) -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_KISMET),y) -TARGETS+=kismet +$(KISMET_TARGET_INSTALL_TARGET): + $(call MESSAGE,"Installing") + $(INSTALL) -m 755 $(addprefix $(KISMET_DIR)/, $(KISMET_TARGET_BINARIES)) $(TARGET_DIR)/usr/bin + $(INSTALL) -m 644 $(addprefix $(KISMET_DIR)/conf/, $(KISMET_TARGET_CONFIGS)) $(TARGET_DIR)/etc +ifeq ($(BR2_ENABLE_DEBUG),) + $(STRIPCMD) $(STRIP_STRIP_ALL) $(addprefix $(TARGET_DIR)/usr/bin/, $(KISMET_TARGET_BINARIES)) endif + touch $@ + +$(KISMET_TARGET_UNINSTALL): + $(call MESSAGE,"Uninstalling") + rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(KISMET_TARGET_BINARIES)) + rm -f $(addprefix $(TARGET_DIR)/etc/, $(KISMET_TARGET_CONFIGS)) + rm -f $(KISMET_TARGET_INSTALL_TARGET) $(KISMET_HOOK_POST_INSTALL) |