AOSC Wiki / Developer / Automation / .
Also available in: 简体中文

Packaging Metadata Syntax

Reduced Bash syntax for describing packages

RFC: Packaging Metadata Syntax§

The spec and defines files currently use Bash syntax to define package metadata, which is not easy to parse strictly according to the Bash Reference Manual. Therefore, we propose the use of a reduce set of Bash syntax to reduce parsing and transition cost, as packaging tools will be refactored in languages other than Bash.

Example§

PKGVER=8.2
PKGDEP="x11-lib libdrm expat systemd elfutils libvdpau nettle \
        libva wayland s2tc lm-sensors libglvnd llvm-runtime libclc"
MESON_AFTER="-Ddri-drivers-path=/usr/lib/xorg/modules/dri \
             -Db_ndebug=true" 
MESON_AFTER__AMD64=" \
             ${MESON_AFTER} \
             -Dlibunwind=true"

Permitted Bash Syntax§

Prohibited Bash Syntax§

All recursion is not allowed.

Patterns§

Pattern Matching is only used in ${parameter/pattern/string}. Only * and ? is supported.