include $(TOPDIR)/rules.mk
include $(TOPDIR)/draytek_include/draytek_info

PKG_NAME:=nbtscan
PKG_VERSION:=1.5.1
PKG_RELEASE:=1
PKG_LICENSE:=GPL

include $(INCLUDE_DIR)/package.mk

define Package/nbtscan
	SECTION:=apps
	CATEGORY:=DrayOS5
	SUBMENU:=System
	TITLE:=Scanning NetBIOS name
endef

define Package/nbtscan/description
  NBTscan is a program for scanning IP networks for NetBIOS name information.
endef

define Build/Prepare
	@echo "Preparing...................."
	$(call Build/Prepare/Default)
endef

define Build/Configure
endef

TARGET_CFLAGS = -I$(TOPDIR)/draytek_include -D_DRAYTEK_PATCH

ifeq ($(CONFIG_USE_GLIBC), y)
TARGET_CFLAGS += -D_GNU_SOURCE
endif

define Build/Compile
	@echo "Compile ........"
	$(call Build/Compile/Default)
endef

define Package/nbtscan/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/nbtscan $(1)/usr/bin
endef

define Build/InstallDev
	@echo "InstallDev...................."
endef

$(eval $(call BuildPackage,nbtscan))