-P Set PKGDEST to REPODEST/<repo>/\$CARCH, where repo is the parents dir name

-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)

abuild commands

build Compile and install package into \$pkgdir

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 the APKINDEX for abuildrepo

listpkg List target packages

package Create package in \$PKGDEST

prepare Apply patches

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

abump

The tool abump is an utility to bump pkgver in APKBUILD files if the package gets an update to a nwer upstream release.

abump [-hR]

abump options

-h Show this help

-R Run abuild with -R for recursive building

-k Keep existing packages

apkgrel

If you want to bump or reset the pkgrel value of your APKBUILD or test your APKBUILD files, apkgrel can assist you.

apkgrel -a|-h|-s NUM|-t|-z [-f] FILE...

apkgrel options

-a Add 1 to current pkgrel

-f Force, even if given files are not in proper format

-h Show this help

-s Set pkgrel to NUM

-t Only verify that files are in proper format

-z Set pkgrel to 0

Generating new APKBUILDs

newapkbuild

To create the actual APKBUILD file newapkbuild can serve you a template to start with. It will create a directory with the given package name, place an example/template APKBUILD file to the given directory, and fill some variables if those are provided.

newapkbuild packagename

newapkbuild options

-a Create autotools (use ./configure ...)

-c Copy a sample init.d, conf.d and install script to new directory

-d Set package description (pkgdesc) to DESC

-f Force even if directory already exist

-h Show this help

-l Set package license to LICENSE

-p Create perl package (Assume Makefile.PL is there)

-y Create python package (Assume setup.py is there)

-u Set package URL

-s Use sourceforge source url

apkbuild-cpan

The Comprehensive Perl Archive Network (CPAN) provides a large collection of perl software and documentation. apkbuild-cpan helps with the creation of APKBUILD for perl modules from CPAN.

The public key should be distributed and installed into /etc/apk/keys on the alpine box that will install the packages. This basically means that the main developer's public keys should be in /etc/apk/keys on all Alpine boxes.