Complex Subpackages in an APKBUILD

Understand how subpackages in an APKBUILD interact with each other.

We'll cover the following

Preface

Almost every APKBUILD has some sort of subpackage, be it for splitting documentation or for translation files. This allows installations to be as minimal as possible. If, for example, we have our language set to English and don’t want our applications to be translated to other languages, we don’t have to install the -lang subpackage, saving the space it would otherwise take up.

Execution order of subpackages

Let’s recall how subpackages are defined in an APKBUILD with an example. Let’s say we have a library that contains the library itself, translation files, documentation, some utility binaries, and language bindings for the Ruby language. We may define the subpackages variable like so:

Get hands-on with 1400+ tech skills courses.