include $(TOPDIR)/rules.mk

PKG_NAME:=uniberg-uconfigd-role-ap
PKG_VERSION:=$(shell git show -s --format=%cd --date=short)
PKG_RELEASE:=1

PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk

define Build/Prepare
endef

define Build/Compile
endef

define Package/uniberg-uconfigd-role-ap
  SECTION:=net
  CATEGORY:=Network
  TITLE:=Meta-Package for the controller role
  DEPENDS:=+uniberg-uconfigd
endef

define Package/uniberg-uconfigd-role-ap/install
	$(INSTALL_DIR) $(1)/lib/uniberg/uconfig $(1)/etc/uci-defaults
	echo "ap" > $(1)/lib/uniberg/role

	$(CP) ./files/init-config-template.json $(1)/lib/uniberg/uconfig/init-config-template.json
endef

$(eval $(call BuildPackage,uniberg-uconfigd-role-ap))
