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"

未完待续

posted on 2019-01-29 17:02 ramlife 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/ramlife/p/10334833.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值