其他分享
首页 > 其他分享> > gentoo ebuild 私人portage

gentoo ebuild 私人portage

作者:互联网

最近考虑搞个私人 portage, 用于一些软件的安装和管理。

mkdir -p /usr/local/portage/app-misc/hello-world
cd $_
cp /usr/portage/header.txt ./hello-world-1.0.ebuild
vim hello-world-1.0.ebuild

EAPI=7

DESCRIPTION=""
HOMEPAGE=""
SRC_URI=""

LICENSE=""
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""

上面这个是基础模板。

vim hello-world-1.0.ebuild

DESCRIPTION="A classical example to use when starting on something new"
SLOT="0"

ebuild hello-world-1.0.ebuild manifest clean merge
输出:

Appending /usr/local/portage to PORTDIR_OVERLAY...
!!! Repository 'x-portage' is missing masters attribute in '/usr/local/portage/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
>>> Creating Manifest for /usr/local/portage/app-misc/hello-world
 * checking ebuild checksums ;-) ...                                                                                                          [ ok ]
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/app-misc/hello-world-1.0/work
>>> Preparing source in /var/tmp/portage/app-misc/hello-world-1.0/work ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-misc/hello-world-1.0/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-misc/hello-world-1.0/work ...
>>> Source compiled.
>>> Test phase [not enabled]: app-misc/hello-world-1.0

>>> Install hello-world-1.0 into /var/tmp/portage/app-misc/hello-world-1.0/image category app-misc
>>> Completed installing hello-world-1.0 into /var/tmp/portage/app-misc/hello-world-1.0/image

 * Final size of build directory: 4 KiB
 * Final size of installed tree:  4 KiB

 * checking 0 files for package collisions
>>> Merging app-misc/hello-world-1.0 to /
>>> app-misc/hello-world-1.0 merged.

上面是基本的 ebuild.

vim hello-world-1.0.ebuild

EAPI=7
HOMEPAGE="https://wiki.gentoo.org/index.php?title=Basic_guide_to_write_Gentoo_Ebuilds"
SRC_URI="https://dev.gentoo.org/~tomwij/files/wiki/hello-world-1.0.tar.gz"
LICENSE="MIT"

未完待续

标签:1.0,gentoo,portage,app,misc,ebuild,world,hello
来源: https://www.cnblogs.com/ramlife/p/10334833.html