#
# 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:=ble
PKG_VERSION:=1.0.1
PKG_RELEASE:=1
PKG_MAINTAINER:=Andy Gelme
PKG_LICENSE:=AGPLv3

PKG_NAME:=ble_dbus

include $(INCLUDE_DIR)/package.mk

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

define Package/ble_dbus/description
  ble support python
endef

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

define Package/ble_dbus/install
	$(INSTALL_DIR) $(1)/app/
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) ./files/ble $(1)/etc/init.d
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ble $(1)/app/
endef

$(eval $(call BuildPackage,ble_dbus))
