I have the next Makefile:
include $(TOPDIR)/rules.mk
PKG_NAME:=modbus
PKG_VERSION:=1.0
PKG_RELEASE:=0
# This specifies the directory where we're going to build the program.
# The root build directory, $(BUILD_DIR), is by default the build_mipsel
# directory in your OpenWrt SDK directory
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/modbus
CATEGORY:=test
TITLE:=modbus
DEPENDS:=+libstdcpp
endef
define Package/modbus/description
modbus interface
endef
define Build/Compile
endef
define Package/modbus/install
$(INSTALL_DIR) $(1)/modbus
$(INSTALL_BIN) ./src/bandwidth-client $(1)/modbus
$(INSTALL_BIN) ./src/modbus-mipsel $(1)/modbus
$(INSTALL_BIN) ./src/modbus.db $(1)/modbus
$(INSTALL_BIN) ./src/modbus.lua $(1)/modbus
$(INSTALL_BIN) ./src/normal.lua $(1)/modbus
$(INSTALL_BIN) ./src/modbusmodule.lua $(2)/usr/lib/lua/luci/controller/admin
$(INSTALL_DIR) $(3)/usr/lib/lua/luci/view/modbusmodule
$(INSTALL_BIN) ./src/modbus.htm $(3)/usr/lib/lua/luci/view/modbusmodule
$(INSTALL_BIN) ./src/service.htm $(3)/usr/lib/lua/luci/view/modbusmodule
endef
# This line executes the necessary commands to compile our program.
# The above define directives specify all the information needed, but this
# line calls BuildPackage which in turn actually uses this information to
# build a package.
$(eval $(call BuildPackage,modbus))
The thing is that this files don't get installed in the device (all the /modbus are installed) and i don't get any errors during compilation and during installation.
$(INSTALL_BIN) ./src/modbusmodule.lua $(2)/usr/lib/lua/luci/controller/admin
$(INSTALL_DIR) $(3)/usr/lib/lua/luci/view/modbusmodule
$(INSTALL_BIN) ./src/modbus.htm $(3)/usr/lib/lua/luci/view/modbusmodule
$(INSTALL_BIN) ./src/service.htm $(3)/usr/lib/lua/luci/view/modbusmodule
The other problem that i have is that all the files don't have initial permissions for al the users, they come like -rwxr-xr-x, why they change the initial permissions of the files ?