#
# Copyright (C) 2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=blue_lnxall
PKG_VERSION:=1.0.1
PKG_RELEASE:=1
PKG_MAINTAINER:=Andy Gelme
PKG_LICENSE:=AGPLv3

PKG_NAME:=blue_lnxall

include $(INCLUDE_DIR)/package.mk

define Package/blue_lnxall
	ECTION:=DYIOT
	CATEGORY:=DYIOT Software
	TITLE:=$(PKG_NAME)
	DEPENDS:=+bluez-libs +libuci +libdyutils +libubox +glib2
endef

define Package/blue_lnxall/description
  ble support python
endef

define Build/Prepare
	mkdir -p $(PKG_BUILD_DIR)
	$(CP) ./src/* $(PKG_BUILD_DIR)/
endef

define Package/blue_lnxall/install
	$(INSTALL_DIR) $(1)/app/bluetooth/
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) ./files/blue_lnxall $(1)/etc/init.d
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ble $(1)/app/
	$(INSTALL_BIN) ./files/*.py $(1)/app/bluetooth/
endef

$(eval $(call BuildPackage,blue_lnxall))
