Include:Abuild: Difference between revisions

From Alpine Linux
(added to Development Category)
(10 intermediate revisions by 5 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.
To build a package, <tt>abuild</tt> 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 a APKBUILD file, only those two command are needed.
If you just want to build a package from an [[APKBUILD Reference|APKBUILD]] file, only those two command are needed.


{{Cmd|abuild checksum && abuild -r}}
{{Cmd|abuild checksum && abuild -r}}
To use the command above, you have to be in the <code>abuild</code> group.


Below all options and commands for <tt>abuild</tt> are listed.
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>}}
{{Cmd|<nowiki>abuild [options] [-P REPODEST] [-s SRCDEST] [-D DESCRIPTION] [cmd] ...</nowiki>}}
 
{{Cmd|<nowiki>abuild [-c] -n PKGNAME[-PKGVER]</nowiki>}}


'''abuild options'''
'''abuild options'''
* '''-A'''  Print CARCH and exit                                                                                                                                                 
* '''-c'''  Enable colored output
* '''-c'''  Enable colored output
* '''-d'''  Disable dependency checking
* '''-d'''  Disable dependency checking
* '''-f'''  Force specified cmd, even if they are already done
* '''-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
* '''-F'''  Force run as root
* '''-h'''  Show this help
* '''-h'''  Show this help
* '''-i'''  Install PKG after successul build
* '''-i'''  Install PKG after successful build
* '''-k'''  Keep built packages, even if APKBUILD or sources are newer
* '''-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)
* '''-m'''  Disable colors (monochrome)
* '''-p'''  Set package destination directory
* '''-P'''  Set REPODEST as the repository location for created packages
* '''-P'''  Set PKGDEST to REPODEST/<repo>/\$CARCH, where repo is the parents dir name
* '''-q'''  Quiet
* '''-q'''  Quiet
* '''-r'''  Install missing dependencies from system repository (using sudo)
* '''-r'''  Install missing dependencies from system repository (using sudo)
Line 27: Line 30:
* '''-s'''  Set source package destination directory
* '''-s'''  Set source package destination directory
* '''-u'''  Recursively build and upgrade all dependencies (using sudo)
* '''-u'''  Recursively build and upgrade all dependencies (using sudo)
* '''-v'''  Verbose: show every command as it is run (very noisy)
   
   
'''abuild commands'''
'''abuild commands'''
* '''checksum'''   Generate checksum to be included in APKBUILD
* '''build'''      Compile and install package into $pkgdir
* '''fetch'''  Fetch sources to \$SRCDEST and verify checksums
* '''check'''      Run any defined tests concerning the package
* '''sanitycheck''' Basic sanity check of APKBUILD
* '''checksum'''   Generate checksum to be included in APKBUILD
* '''md5check''' Check md5sums
* '''clean'''      Remove temp build and install dirs
* '''unpack''' Unpack sources to \$srcdir
* '''cleancache'''  Remove downloaded files from $SRCDEST
* '''build''' Compile and install package into \$pkgdir
* '''cleanoldpkg''' Remove binary packages except current version
* '''listpkg'''   List target packages
* '''cleanpkg'''   Remove already built binary and source package
* '''package''' Create package in \$PKGDEST
* '''deps'''       Install packages listed in makedepends and depends
* '''rootpkg''' Run '$0 build package' as fakeroot
* '''fetch'''       Fetch sources to $SRCDEST and verify checksums
* '''clean''' Remove temp build and install dirs
* '''index'''       Regenerate indexes in $REPODEST
* '''cleanoldpkg''' Remove binary packages except current version
* '''listpkg'''     List target packages
* '''cleanpkg''' Remove already built binary and source package
* '''package'''     Create package in $PKGDEST
* '''cleancache''' Remove downloaded files from \$SRCDEST
* '''prepare'''    Apply patches
* '''srcpkg''' Make a source package
* '''rootbld'''     Build package in clean chroot
* '''sourcecheck''' Check if remote source package exists upstream
* '''rootpkg'''     Run 'package', the split functions and create apks as fakeroot
* '''up2date''' Compare target and sources dates
* '''sanitycheck''' Basic sanity check of APKBUILD
* '''installdeps''' Install packages listed in makedepends and depends
* '''snapshot'''   Create a $giturl or $svnurl snapshot and upload to $disturl
* '''uninstalldeps''' Uninstall packages listed in makedepends and depends
* '''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 =
* [[Abuild and Helpers]]


[[Category:Development]]
[[category: Package Manager]]

Revision as of 07:18, 18 October 2019

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 those two command are needed.

abuild checksum && abuild -r

To use the command above, you have to be in the abuild group.


Below all options and commands for abuild are listed.

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

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
  • -i Install PKG after successful build
  • -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)
  • -R Recursively build and install missing dependencies (using sudo)
  • -s Set source package destination directory
  • -u Recursively build and upgrade all dependencies (using sudo)
  • -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 and verify checksums
  • index Regenerate indexes in $REPODEST
  • listpkg List target packages
  • package Create package in $PKGDEST
  • 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