When "ebuild" executes, it first tries to "source" variable "$1".
当执行 "ebuild" 时,它首先试图 "source"变量 "$1"。
Bash is an essential component of the Gentoo Linux ebuild system.
Bash是GentooLinuxebuild系统的基本组件。
We need to make some more changes to the ebuild system to accommodate these programs.
需要再对ebuild系统做一些改动,以适应这些程序。
Normally, this option would be used to allow the user to tell ebuild to do a parallel make.
通常,将使用该选项来允许用户告诉ebuild执行并行make。
If there is a user_compile in e2fsprogs-1.18.ebuild, it overwrites the default version defined previously.
如果在e2fsprogs - 1.18 . ebuild中有一个user_compile,则它覆盖前面定义的缺省版本。
Before we look at the ebuild system, let's review what's involved in getting a package compiled and installed.
在讨论ebuild系统之前,让我们回顾一下编译和安装包都牵涉些什么。
I'd like the ebuild script to accept a second command-line argument, which will be "compile", "unpack", or "all".
我希望ebuild脚本再接受一个命令行自变量:“compile ”、“unpack ”或“all ”。
In the ebuild script, the default user_compile function is defined before the e2fsprogs-1.18.ebuild file is sourced.
ebuild脚本中,在执行e2 fsprogs - 1.18 . ebuild文件之前定义缺省user_compile函数。
One of the most obvious changes in our second version of the ebuild script is the new case statement at the end of the code.
ebuild脚本第二版中最明显的改动之一就是代码末尾新的case语句。
To enhance your bash knowledge, I'll show you how I implemented the unpack and compile portions of the ebuild system, step by step.
为了增加您的bash知识,我将循序渐进地为您演示如何实现该ebuild系统的解包和编译部分。
So, "source ${1}" causes the "ebuild" script to execute the commands in "sed-3.02.ebuild", which cause "$P" and "$A" to be defined.
因此,"source ${1}"导致 "ebuild"脚本执行在 "sed-3.02.ebuild"中定义 "$P"和 "$A" 的命令。
That way, I can tell ebuild to unpack the archive, but not compile it (just in case I need to inspect the source archive before compilation begins).
通过这种方式,可以告诉ebuild解包档案,但不进行编译(以便在开始编译之前查看源代码档案)。
That way, the.ebuild files end up being really simple, while the complicated brains of the ebuild system get stored in one place — our "ebuild" script.
通过这种方式,.ebuild文件最终非常简单,而将ebuild系统复杂的操作部分存在一处,即“ ebuild ”脚本中。
Now that the code is quite advanced and functional, you may be tempted to create several more ebuild scripts to unpack and compile your favorite programs.
既然代码很高级并且实用,您可能很想创建几个更高级的ebuild脚本,以解包和编译所喜爱的程序。
This design change is really handy, because if we want to compile another program instead of sed, we can simply create a new.ebuild file and pass it as an argument to our "ebuild" script.
这种设计更改确实方便,因为如果要编译另一个程序,而不是sed,可以简单地创建一个新的.ebuild文件,然后将其作为自变量传递给“ ebuild ”脚本。
This way, we can upgrade or enhance the ebuild system simply by editing the "ebuild" script, keeping the implementation details outside of the ebuild files. Here's a sample ebuild file for gzip
通过这种方式,只需编辑 "ebuild"脚本就可以升级或增强 ebuild系统,同时将实现细节保留在 ebuild文件之外。
But, we must also have the ebuild system accommodate sources that do not use autoconf or normal Makefiles. To solve this problem, I propose that our ebuild script should, by default, do the following.
但是,还必须使ebuild系统适应那些不使用autoconf或正常make文件的源代码。
But, we must also have the ebuild system accommodate sources that do not use autoconf or normal Makefiles. To solve this problem, I propose that our ebuild script should, by default, do the following.
但是,还必须使ebuild系统适应那些不使用autoconf或正常make文件的源代码。
应用推荐