include $(TOPDIR)/rules.mk

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

PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk

define Package/uniberg-auther
  SECTION:=net
  CATEGORY:=Network
  DEPENDS:=+libubox +libubus +libblobmsg-json +libcurl +libopenssl +libjson-c
  TITLE:=Dynamic PSK authentication helper
endef

define Package/uniberg-auther/install
	$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/auther $(1)/usr/bin/uniberg-auther
	$(INSTALL_BIN) ./files/auther.init $(1)/etc/init.d/uniberg-auther
endef

$(eval $(call BuildPackage,uniberg-auther))
