#
# 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

VERSION_YEAR=$(shell date +%Y)
VERSION_MAJOR=$(shell expr $(VERSION_YEAR) - 2018)
VERSION_MINOR=$(shell date +%V%u)
#VERSION_REVISION=$(shell date +%H%M)
VERSION_REVISION=0000
PKG_VERSION:=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_REVISION)


PKG_NAME:=guanmai
PKG_MAINTAINER:=Leilei Wang <leilei.wang@lnxall.com>
PKG_LICENSE:=MIT

include $(INCLUDE_DIR)/package.mk

define Package/guanmai
	SECTION:=DYIOT
	CATEGORY:=DYIOT Software
	TITLE:=guanmai_cfg
	URL:=https://github.com/nicephil/lnxallfiles
endef

define Package/guanmai/description
	guanmai config file
endef

define Build/Prepare
endef

define Build/Configure
endef

define Build/Compile
endef

define Build/Install
endef

define Package/guanmai/install
	$(CP) ./files/* $(1)
	$(INSTALL_BIN) ./files/deploy_guanmai.sh $(1)/app/
endef

define Package/guanmai/postinst
	/app/deploy_guanmai.sh
endef

$(eval $(call BuildPackage,guanmai))
