#
# 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:=panasonicIfu
PKG_VERSION:=2.0.1
PKG_RELEASE:=0
PKG_MAINTAINER:=Andy Gelme
PKG_LICENSE:=AGPLv3

PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk

define Package/panasonicIfu
	ECTION:=DYIOT
	CATEGORY:=DYIOT Software
	TITLE:=$(PKG_NAME)
  	DEPENDS:=+lua +lua-chronos +lua-mqtt +lua-libutils
endef

define Package/panasonicIfu/description
  MQTT client for Lua
endef

TARGET_CFLAGS += $(FPIC) -DUSE_GLOBALS

# add make variable overrides here
MAKE_FLAGS += -DUSE_GLOBALS

define Build/Prepare
endef

define Build/Configure
endef

define Build/Compile
endef

define Build/Install
endef

define Package/panasonicIfu/install
	$(INSTALL_DIR) $(1)/app/panasonicIfu/
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) ./files/panasonicIfu.initd $(1)/etc/init.d/panasonicIfu
	$(INSTALL_BIN) ./files/*.lua $(1)/app/panasonicIfu/
endef

$(eval $(call BuildPackage,panasonicIfu))
