[英]Guidance building Elixir package for OpenWRT
I'm looking to compile an Elixir package for OpenWRT, but am new to building Makefiles for OpenWRT. 我正在寻找为OpenWRT编译Elixir包,但我是为OpenWRT构建Makefile的新手。
I'm not sure where to start and plan to start by scaling down the erlang Makefile ( https://github.com/openwrt/packages/blob/master/lang/erlang/Makefile ) and start with erlang as it's only dependency. 我不知道从哪里开始并计划开始缩小erlang Makefile( https://github.com/openwrt/packages/blob/master/lang/erlang/Makefile )并从erlang开始,因为它只是依赖。
I have looked for a guide on getting started with OpenWRT Makefiles, but have not found one. 我已经找了一个关于OpenWRT Makefiles入门的指南,但还没有找到。
Would anyone be willing to guide me through the process? 有人愿意指导我完成这个过程吗?
First, read this manual: http://wiki.openwrt.org/doc/devel/packages 首先,阅读本手册: http : //wiki.openwrt.org/doc/devel/packages
Basically, you will need to create <openwrt-dir>/package/elixir
directory and create a Makefile there like this: 基本上,您需要创建
<openwrt-dir>/package/elixir
目录并在其中创建一个Makefile,如下所示:
include $(TOPDIR)/rules.mk
PKG_NAME:=elixir
PKG_REV:=0e3c06b03149022b980e69872003d401c4788fea
PKG_VERSION:=v1.1.0-rc.0
PKG_RELEASE=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/elixir-lang/elixir.git
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=lang
CATEGORY:=Languages
TITLE:=Elixir
DEPENDS+= +erlang
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/elixir $(1)/usr/bin
# copy other files that are needed on target
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
Then, issue make menuconfig
command and select your newly created package. 然后,发出
make menuconfig
命令并选择新创建的包。
After that, compile by running make package/elixir/install V=s
and look if it compiles (it does on my machine). 之后,通过运行
make package/elixir/install V=s
编译并查看它是否编译(它在我的机器上执行)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.