Include:Abuild: Difference between revisions

From Alpine Linux
(De-duplicate options and commands. They are already listed in the man page, no point in duplicating things here.)
Line 10: Line 10:
Also, if you haven't already, you will need to [[Abuild_and_Helpers#Setting_up_the_build_environment|setup your abuild environment]].
Also, if you haven't already, you will need to [[Abuild_and_Helpers#Setting_up_the_build_environment|setup your abuild environment]].


Below all options and commands for <tt>abuild</tt> are listed.
The [https://git.alpinelinux.org/abuild/tree/abuild.1.scd manual page] (available via <code>man abuild</code>) describes all options and commands for <code>abuild</code>.
 
{{Cmd|<nowiki>abuild [options] [-P REPODEST] [-s SRCDEST] [-D DESCRIPTION] [cmd] ...</nowiki>}}
 
'''abuild options'''
* '''-A'''  Print CARCH and exit                                                                                                                                                 
* '''-c'''  Enable colored output
* '''-d'''  Disable dependency checking
* '''-D'''  Set APKINDEX description (default: $repo $(git describe))
* '''-f'''  Force specified cmd (skip checks: apk up to date, arch, libc)
* '''-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'''  Set REPODEST as the repository location for created packages
* '''-q'''  Quiet
* '''-r'''  Install missing dependencies from system repository (using sudo)
* '''-s'''  Set source package destination directory
* '''-v'''  Verbose: show every command as it is run (very noisy)
 
'''abuild commands'''
* '''build'''      Compile and install package into $pkgdir
* '''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 (consider: 'abuild fetch verify')
* '''index'''      Regenerate indexes in $REPODEST
* '''listpkg'''    List target packages
* '''package'''    Install project into $pkgdir
* '''prepare'''    Apply patches
* '''rootbld'''    Build package in clean chroot
* '''rootpkg'''    Run 'package', the split functions and create apks as fakeroot
* '''sanitycheck''' Basic sanity check of APKBUILD
* '''snapshot'''    Create a $giturl or $svnurl 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
* '''verify'''      Verify checksums


==== See also ====
==== See also ====

Revision as of 14:25, 19 November 2023

To build a package, abuild is used. Besides the package building functionality, options for other package maintainance tasks are also provided.

If you just want to build a package from an APKBUILD file, only two command are needed.

First cd into the package directory (the directory with the APKBUILD file). Then run:

abuild checksum && abuild -r

To use the command above, you have to be in the abuild group. Also, if you haven't already, you will need to setup your abuild environment.

The manual page (available via man abuild) describes all options and commands for abuild.

See also