abuild(1)
π
abuild β aka the manual page for abuild(1), General Commands Manual, bestie β¨
okay so listen. <pink>abuild</pink> builds an apk binary package based on an input APKBUILD(5), and it also does a bunch of other related operations. that's the whole vibe. it's the main character of Alpine packaging fr fr π
β¨ SYNOPSIS β¨
abuild [options] [-C DIR] [-P REPODEST] [-s SRCDEST] [-D DESCRIPTION]
[cmd] ...
like, options first, then optionally a command, and if you don't give a command it just does the whole thing (we'll get there, don't worry) π«Ά
πΈ DESCRIPTION πΈ
so <purple>abuild</purple> builds an apk binary package based on an input APKBUILD(5), as well as other related operations. that's it, that's the tweet. it's giving "one tool, many jobs", and honestly? iconic π
β¨ OPTIONS β¨
-Aβ printsCARCHand then dips. that's it. that's the whole flag π-cβ turn on colored output π-C DIRβ change directory to DIR before running any commands. very "we're going to a different folder, come on" energy-dβ disable dependency checking. no cap, just skip it π-D DESCRIPTIONβ set theAPKINDEXdescription (default:$repo $(git describe)). yes the default literally runsgit describe, slay-fβ force the specifiedcmd, which means skipping the checks: apk up to date, arch. you're overriding the vibe check, be careful π-Fβ force run as root π-hβ show this help. hi bestie, here's the help π«Ά-kβ keep built packages, even ifAPKBUILDor sources are newer. so stubborn, love that for you-Kβ keep buildtime temp dirs and files (srcdir/pkgdir/deps). hoarder mode, valid-mβ disable colors, aka monochrome mode. sad beige terminal π₯²-P REPODESTβ setREPODESTas the repository location for created packages-qβ quiet π€«-rβ install missing dependencies from the system repository-s SRCDESTβ set the source package destination directory to SRCDEST-vβ verbose: show every command as it is run. the manpage itself calls this very noisy, and it's so right π
π¦ COMMANDS π¦
allβ runs the entire build process. this is the default when no other command is specified, and is roughly an alias forvalidate builddeps clean fetch unpack prepare mkusers build check rootpkg. the whole pipeline, the full main character arc βbuildβ compile and install package into$pkgdircheckβ run any defined tests concerning the package π§ͺchecksumβ generate checksum to be included inAPKBUILDcleanβ remove temp build and install dirs π§Ήcleancacheβ remove downloaded files from$SRCDESTcleanoldpkgβ remove binary packages except current versioncleanpkgβ remove already built binary and source packagedepsβ install packages listed inmakedependsanddependsfetchβ fetch sources to$SRCDESTindexβ regenerate indexes in$REPODESTlistpkgβ list target packages πpackageβ install project intoprepareβ apply patches π©Ήrootbldβ build package in clean chroot. requiresabuild-rootbldrootpkgβ run 'package', the split functions and create apks asfakerootvalidateβ basic validation ofAPKBUILDβsnapshotβ create a$giturlsnapshot and upload to$disturlπΈsourcecheckβ check if remote source package exists upstreamsrcpkgβ make a source packageundepsβ uninstall packages listed inmakedependsanddependsunpackβ unpack sources to$srcdirup2dateβ compare target and sources dates
π ENVIRONMENT π
APKBUILDβ override path toAPKBUILDfileBOOTSTRAPβ 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
noccomits any compilation (e.g.: include only source headers). - a value of
nolibcassumes that no libc is available. - this list of values is not exhaustive π
- a value of
CHOSTβ generate packages for given arch or tripletCTARGETβ generate compiler for given arch or tripletPACKAGERβ name and email of the packages in RFC5322 format. 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$repois the base name of the parent directory of$startdirSOURCE_DATE_EPOCHβ use this timestamp as a reference for reproducible builds. seehttps://reproducible-builds.org/docs/source-date-epoch/SUDO_APKβ command to use to run apk as root. defaults toabuild-apkUSE_CCACHEβ if set to a non-empty value, enables ccache supportUSE_COLORSβ if set to a non-empty value, print coloured output using ANSI escape sequences πΈ
ngl the "non-empty value" thing is doing a lot of work here β it's not "true", it's not "1", it's literally just "anything that isn't empty". iykyk π
π 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
see how -r and -c just smoosh together like that? obsessed π«Ά
π SEE ALSO π
SPDX license reference (on the Web at <https://spdx.org/licenses/>), 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>
that's the page!! this version of the abuild(1) manpage from the General Commands Manual is dated <yellow>2026-06-05</yellow>, and yeah the footer just says abuild(1) again because manpages love a little symmetry π go build something cute, bestie, and remember: validate before you ship, periodt π§
π¦ where this page comes from
- alpine 3.24: abuild-doc 3.17.0-r0 Β· GPL-2.0-only
- arch rolling: abuild 3.17.0-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms