Preparing for build
This commit is contained in:
parent
a61a450e8c
commit
21ce7a63be
4 changed files with 38 additions and 13 deletions
19
OpenWRT/build.sh
Executable file
19
OpenWRT/build.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
PACKAGE=cronosagent
|
||||
|
||||
PROJECT=$(pwd)/..
|
||||
OPENWRT=${HOME}/openwrt
|
||||
|
||||
rm -rf $OPENWRT/package/$PACKAGE
|
||||
mkdir -p $OPENWRT/package/$PACKAGE/source
|
||||
cp -R $PROJECT $OPENWRT/package/$PACKAGE/source
|
||||
rm $OPENWRT/package/$PACKAGE/source/OpenWRT/package/Makefile
|
||||
rm -rf $OPENWRT/package/$PACKAGE/source/.git
|
||||
|
||||
pushd .
|
||||
|
||||
cd $OPENWRT
|
||||
make
|
||||
|
||||
popd
|
|
@ -5,7 +5,7 @@ local section = map:section(TypedSection, "cronosagent", "Configuration")
|
|||
local number = section:option(Value, "number", "Repeater ID", "DMR ID assigned to your repeater" )
|
||||
local repeater = section:option(Value, "repeaterAddress", "Repeater Address", "Address of your KAIROS repeater" )
|
||||
local server = section:option(Value, "serverAddress", "Server address", "Address of BrandMeister DMR Server")
|
||||
local password = section:option(Value, "serverPassword", "Password", "Password to login" )
|
||||
local password = section:option(Value, "serverPassword", "Password", "Password to login to the server" )
|
||||
|
||||
number.datatype = "range(1,16777215)"
|
||||
repeater.datatype = "ip4addr"
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -2,3 +2,7 @@
|
|||
/usr/lib/lua/luci/model/cbi/cronosagent/configure.lua
|
||||
/etc/config/cronosagent
|
||||
/etc/init.d/cronosagent
|
||||
|
||||
Copy OpenWRT/package/Makefile -> ~/openwrt/packages/cronosagent/Makefile
|
||||
Copy * -> ~/openwrt/packages/cronosagent/source/*
|
||||
Remove ~/openwrt/packages/cronosagent/source/OpenWRT/package/Makefile
|
Loading…
Add table
Reference in a new issue