LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ebuild

Gentoo package build interface

TLDR

Create/update package manifest
$ ebuild [path/to/file.ebuild] manifest
copy
Clean temporary build directories
$ ebuild [path/to/file.ebuild] clean
copy
Fetch sources
$ ebuild [path/to/file.ebuild] fetch
copy
Extract sources
$ ebuild [path/to/file.ebuild] unpack
copy
Compile sources
$ ebuild [path/to/file.ebuild] compile
copy
Install to temporary directory
$ ebuild [path/to/file.ebuild] install
copy
Install to live filesystem
$ ebuild [path/to/file.ebuild] qmerge
copy
Full build (fetch, unpack, compile, install, merge)
$ ebuild [path/to/file.ebuild] merge
copy

SYNOPSIS

ebuild file command...

DESCRIPTION

ebuild is a low-level interface to the Gentoo Portage system. It processes ebuild files, which are Bash scripts describing how to build and install packages.The tool provides direct access to individual build phases (fetch, unpack, compile, install, merge), allowing developers to test and debug packages step-by-step. This is essential for package maintainers creating or modifying ebuilds.While emerge is used for normal package management, ebuild gives fine-grained control over the build process. It's particularly useful for testing new packages before adding them to the portage tree or for manually installing custom ebuilds.

PARAMETERS

manifest

Create/update package manifest
clean
Remove temporary build files
fetch
Download source files
unpack
Extract sources
compile
Build the package
install
Install to temp directory
qmerge
Merge to live filesystem
merge
All steps combined
unmerge
Remove from live filesystem
setup
Run pre-build setup phase
prepare
Run source preparation (patches, etc.)
configure
Run configure phase
test
Run package tests
prerm
Execute pre-removal tasks
postrm
Execute post-removal tasks
postinst
Execute post-installation tasks
digest
Create manifest (legacy alias for manifest)

CAVEATS

Gentoo-specific. For normal package management, use emerge. Ebuild files require specific directory structure in portage tree. By default, ebuild executes all phases in order up to the specified one, skipping phases already completed in a previous invocation.

SEE ALSO

emerge(1), equery(1)

Copied to clipboard
Kai