kumquat-buildroot/package/kismet/kismet.mk
Thomas Petazzoni 2ab8ec9e26 kismet: fix build when none of client, server or drone are selected
Random package configuration can trigger the selection of kismet, but
neither of client, server or drone suboptions. In this case, the
KISMET_TARGET_BINARIES variable is empty, leading to failure during
the installation stage.

At the same time, we remove the useless stripping of the installed
binaries, since this is done globally by the Buildroot infrastructure.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-08-30 11:08:32 +02:00

53 lines
1.4 KiB
Makefile

#############################################################
#
# kismet
#
#############################################################
KISMET_VERSION = 2010-01-R1
KISMET_SITE = http://www.kismetwireless.net/code
KISMET_DEPENDENCIES = libpcap ncurses
ifeq ($(BR2_PACKAGE_LIBNL),y)
KISMET_DEPENDENCIES += libnl
endif
ifeq ($(BR2_PACKAGE_PCRE),y)
KISMET_DEPENDENCIES += pcre
endif
ifeq ($(BR2_PACKAGE_KISMET_CLIENT),y)
KISMET_TARGET_BINARIES += kismet_client
endif
ifeq ($(BR2_PACKAGE_KISMET_SERVER),y)
KISMET_TARGET_BINARIES += kismet_server
KISMET_TARGET_CONFIGS += kismet.conf
endif
ifeq ($(BR2_PACKAGE_KISMET_DRONE),y)
KISMET_TARGET_BINARIES += kismet_drone
KISMET_TARGET_CONFIGS += kismet_drone.conf
endif
$(eval $(call AUTOTARGETS,package,kismet))
$(KISMET_TARGET_INSTALL_TARGET):
$(call MESSAGE,"Installing")
ifdef KISMET_TARGET_BINARIES
$(INSTALL) -m 755 $(addprefix $(KISMET_DIR)/, $(KISMET_TARGET_BINARIES)) $(TARGET_DIR)/usr/bin
endif
ifdef KISMET_TARGET_CONFIGS
$(INSTALL) -m 644 $(addprefix $(KISMET_DIR)/conf/, $(KISMET_TARGET_CONFIGS)) $(TARGET_DIR)/etc
endif
touch $@
$(KISMET_TARGET_UNINSTALL):
$(call MESSAGE,"Uninstalling")
ifdef KISMET_TARGET_BINARIES
rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(KISMET_TARGET_BINARIES))
endif
ifdef KISMET_TARGET_CONFIGS
rm -f $(addprefix $(TARGET_DIR)/etc/, $(KISMET_TARGET_CONFIGS))
endif
rm -f $(KISMET_TARGET_INSTALL_TARGET) $(KISMET_HOOK_POST_INSTALL)