4
Fork 0

Preparing for build

This commit is contained in:
R3ABM Artem 2016-08-03 08:42:18 +03:00
parent a61a450e8c
commit 21ce7a63be
4 changed files with 38 additions and 13 deletions

View file

@ -3,12 +3,8 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=cronosagent
PKG_VERSION:=master
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@code.brandmeister.network:r3abm/CronosAgent.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=HEAD
PKG_SOURCE:=$(PKG_NAME).tar.gz
PKG_BUILD_DEPENDS:=+libstdcpp +libopenssl
X_SOURCE_DIR:=$(CURDIR)/source
include $(INCLUDE_DIR)/package.mk
@ -27,8 +23,14 @@ define Package/cronosagent/description
which is available on firmware customization 008 (Radio Amateur community)
endef
#define Build/cronosagent/Compile
#$(call Build/Compile/Default, -C $(PKG_BUILD_DIR) )
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) -R $(X_SOURCE_DIR)/*.h $(PKG_BUILD_DIR)/
$(CP) -R $(X_SOURCE_DIR)/*.c $(PKG_BUILD_DIR)/
endef
#define Build/Compile
# $(call Build/Compile/Default, -C $(PKG_BUILD_DIR) )
#endef
define Package/cronosagent/conffiles
@ -51,12 +53,12 @@ define Package/cronosagent/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi/cronosagent
$(INSTALL_BIN) $(BUILD_DIR)/cronosagent.sh $(1)/opt/CronosAgent/
$(INSTALL_BIN) $(X_SOURCE_DIR)/cronosagent.sh $(1)/opt/CronosAgent/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/cronosagent $(1)/opt/CronosAgent/
$(INSTALL_BIN) $(BUILD_DIR)/OpenWRT/init.d/cronosagent $(1)/etc/init.d/
$(INSTALL_DATA) $(BUILD_DIR)/OpenWRT/config/cronosagent $(1)/etc/config/
$(INSTALL_DATA) $(BUILD_DIR)/OpenWRT/controller/cronosagent.lua $(1)/usr/lib/lua/luci/controller/
$(INSTALL_DATA) $(BUILD_DIR)/OpenWRT/model/cbi/cronosagent/configure.lua $(1)/usr/lib/lua/luci/model/cbi/cronosagent/
$(INSTALL_BIN) $(X_SOURCE_DIR)/OpenWRT/init.d/cronosagent $(1)/etc/init.d/
$(INSTALL_DATA) $(X_SOURCE_DIR)/OpenWRT/config/cronosagent $(1)/etc/config/
$(INSTALL_DATA) $(X_SOURCE_DIR)/OpenWRT/controller/cronosagent.lua $(1)/usr/lib/lua/luci/controller/
$(INSTALL_DATA) $(X_SOURCE_DIR)/OpenWRT/model/cbi/cronosagent/configure.lua $(1)/usr/lib/lua/luci/model/cbi/cronosagent/
endef
$(eval $(call BuildPackage,cronosagent))