Include:Abuild: Difference between revisions

From Alpine Linux
(reorder options and commands)
(added back content and removed redirect to this Include page so this can be transcluded)
Tag: Removed redirect
 
(19 intermediate revisions by 11 users not shown)
Line 1: Line 1:
To build a package, <tt>abuild</tt> is used. Beside the package building functionality also options for other package maintainance tasks are provided.
If you just want to build a package from an [[APKBUILD Reference|APKBUILD]] file, only  two command are needed. Both commands operate on an APKBUILD file in the current directory, so you should <code>cd</code> into the directory before running them.


If you just want to build a package from a APKBUILD file, only those two command are needed.
* <code>abuild checksum</code>: updates the checksums for source files.
* <code>abuild -r</code>: builds the package.


{{Cmd|abuild checksum && abuild -r}}
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>.
 
Below all options and commands for <tt>abuild</tt> are listed.
 
{{Cmd|<nowiki>abuild [options] [-i PKG] [-P REPODEST] [-p PKGDEST] [-s SRCDEST] [cmd] ...</nowiki>}}
 
 
'''abuild options'''
* '''-h'''  Show this help
* '''-c'''  Enable colored output
* '''-m'''  Disable colors (monochrome)
* '''-q'''  Quiet
* '''-p'''  Set package destination directory
* '''-P'''  Set PKGDEST to REPODEST/<repo>/\$CARCH, where repo is the parent's dir name
* '''-s'''  Set source package destination directory
* '''-f'''  Force specified cmd, even if they have already been done
* '''-F'''  Force run as root
* '''-d'''  Disable dependency checking
* '''-r'''  Install missing dependencies from system repository (using sudo)
* '''-R'''  Recursively build and install missing dependencies (using sudo)
* '''-u'''  Recursively build and upgrade all dependencies (using sudo)
* '''-k'''  Keep built packages, even if APKBUILD or sources are newer
* '''-i'''  Install PKG after successful build
'''abuild commands'''
* '''sanitycheck'''  Basic sanity check of APKBUILD
* '''checksum'''  Generate checksum to be included in APKBUILD
* '''listpkg'''  List target packages
* '''sourcecheck''' Check if remote source package exists upstream
* '''up2date'''  Compare target and sources dates
 
* '''fetch'''  Fetch sources to \$SRCDEST and verify checksums
* '''md5check'''  Check md5sums
* '''unpack'''  Unpack sources to \$srcdir
* '''build'''  Compile and install package into \$pkgdir
* '''package'''  Create package in \$PKGDEST
* '''rootpkg'''  Run '$0 build package' as fakeroot
 
* '''srcpkg'''  Make a source package
* '''installdeps'''  Install packages listed in makedepends and depends
* '''uninstalldeps'''  Uninstall packages listed in makedepends and depends
 
* '''clean'''  Remove temp build and install dirs
* '''cleanoldpkg'''  Remove binary packages except current version
* '''cleanpkg'''  Remove already built binary and source package
* '''cleancache'''  Remove downloaded files from \$SRCDEST
 
[[Category:Development]]

Latest revision as of 16:55, 13 March 2025

If you just want to build a package from an APKBUILD file, only two command are needed. Both commands operate on an APKBUILD file in the current directory, so you should cd into the directory before running them.

  • abuild checksum: updates the checksums for source files.
  • abuild -r: builds the package.

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