Skip to content

Latest commit

 

History

History
237 lines (157 loc) · 4.68 KB

File metadata and controls

237 lines (157 loc) · 4.68 KB

abuild(1)

NAME

abuild - build an apk from an APKBUILD

SYNOPSIS

abuild [options] [-C DIR] [-P REPODEST] [-s SRCDEST] [-D DESCRIPTION] [cmd] ...

DESCRIPTION

abuild builds apk-tools packages based on an input APKBUILD(5), as well as other related operations.

OPTIONS

-A Print CARCH and exit

-c Enable colored output

-C DIR Change directory to DIR before running any commands

-d Disable dependency checking

-D DESCRIPTION Set APKINDEX description (default: $repo $(git describe))

-f Force specified cmd (skip checks: apk up to date, arch)

-F Force run as root

-h Show this help

-k Keep built packages, even if APKBUILD or sources are newer

-K Keep buildtime temp dirs and files (srcdir/pkgdir/deps)

-m Disable colors (monochrome)

-P REPODEST Set REPODEST as the repository location for created packages

-q Quiet

-r Install missing dependencies from system repository

-s SRCDEST Set source package destination directory to SRCDEST

-v Verbose: show every command as it is run (very noisy)

COMMANDS

all Runs the entire build process. This is the default when no other command is specified, and is roughly an alias for validate builddeps clean fetch unpack prepare mkusers build check rootpkg.

build Compile package in $builddir

check Run any defined tests concerning the package

checksum Generate checksum to be included in APKBUILD

clean Remove temp build and install dirs

cleancache Remove downloaded files from $SRCDEST

cleanoldpkg Remove binary packages except current version

cleanpkg Remove already built binary and source package

deps Install packages listed in makedepends and depends

fetch Fetch sources to $SRCDEST

index Regenerate indexes in $REPODEST

listpkg List target packages

prepare Apply patches

rootbld Build package in clean chroot. Requires abuild-rootbld.

rootpkg Run 'package', the split functions and create apks as fakeroot

validate Basic validation of APKBUILD

snapshot Create a $giturl snapshot and upload to $disturl

sourcecheck Check if remote source package exists upstream

srcpkg Make a source package

undeps Uninstall packages listed in makedepends and depends

unpack Unpack sources to $srcdir

up2date Compare target and sources dates

ENVIRONMENT

ABUILD_PACKAGE_CACHE Cache directory used by rootbld. When set to an empty string the cache is disabled. Defaults to ${XDG_CACHE_HOME:-$HOME/.cache}/apk

APKBUILD Override path to APKBUILD file.

BOOTSTRAP Used when bootstrapping with no existing packages by minimising build dependencies. This flag only has an effect on a few select packages.

A value of _nocc_ omits any compilation (e.g.: include only source headers).
A value of _nolibc_ assumes that no _libc_ is available.

This list of values is not exhaustive.

CBUILDROOT Path to sysroot. Primarily used for cross-compilation.

CBUILD Architecture or triplet of the machine compiling the packages.

CHOST Architecture or triplet of the machine where packages will run.

CTARGET Architecture or triplet of packages that will be produced by the package being compiled. E.g.: when compiling a compiler, the architecture or triplet of the binaries produced by that compiler.

PACKAGER Name and email of the packager in RFC2822-like format (see APKBUILD(5) maintainer for details). E.g.: John Doe john@example.com.

PACKAGER_PRIVKEY Path to a private key used to sign packages.

REPODEST Packages shall be stored in $REPODEST/$repo/$arch/$pkgname-$pkgver-r$pkgrel.apk, where $repo is the base name of the parent directory of $startdir.

SOURCE_DATE_EPOCH Use this timestamp as a reference for reproducible builds. See https://reproducible-builds.org/docs/source-date-epoch/

SUDO_APK Command to use to run apk as root. Defaults to abuild-apk.

USE_CCACHE If set to a non-empty value, enables ccache support.

USE_COLORS If set to a non-empty value, print coloured output using ANSI escape sequences.

FILES

/etc/abuild.conf Configuration is read from this file by default.

$HOME/.abuild/abuild.conf User-specific configuration is read from this file, if it exists.

EXAMPLES

Update checksums for an APKBUILD:

abuild checksum

Build an APKBUILD and print coloured output:

abuild -rc

Build in an emulation (e.g.: with qemu+binfmt):

CBUILD=aarch64 abuild rootbld

Cross-build for armv7 (using a sysroot):

CHOST=armv7 abuild -r

SEE ALSO

newapkbuild(1), apk(8), APKBUILD(5), abuild.conf(5), buildrepo(1), ap(1), checkapk(1).

AUTHORS

abuild: Natanael Copa <ncopa@alpinelinux.org>

Documentation:++ Hugo Osvaldo Barrera <hugo@whynothugo.nl>