build-package.sh: introduce TERMUX_PKG_GROUPS for pacman packaging format (#7609)

This metadata field allows to define groups to which the given packages belong.

See https://wiki.archlinux.org/title/Pacman#Installing_package_groups
This commit is contained in:
Ivan Max 2021-09-28 12:48:55 +03:00 committed by GitHub
parent 532063a4dc
commit 5465f29528
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View File

@ -107,6 +107,10 @@ termux_create_pacman_subpackages() {
if [ -n "$TERMUX_SUBPKG_CONFFILES" ]; then
tr ',' '\n' <<< "$TERMUX_SUBPKG_CONFFILES" | awk '{ printf "backup = '"${TERMUX_PREFIX:1}"'/%s\n", $1 }'
fi
if [ -n "$TERMUX_PKG_GROUPS" ]; then
tr ',' '\n' <<< "${TERMUX_PKG_GROUPS/#, /}" | awk '{ printf "group = %s\n", $1 }'
fi
} > .PKGINFO
# Build metadata.

View File

@ -101,6 +101,10 @@ termux_step_create_pacman_package() {
if [ -n "$TERMUX_PKG_CONFFILES" ]; then
tr ',' '\n' <<< "$TERMUX_PKG_CONFFILES" | awk '{ printf "backup = '"${TERMUX_PREFIX:1}"'/%s\n", $1 }'
fi
if [ -n "$TERMUX_PKG_GROUPS" ]; then
tr ',' '\n' <<< "${TERMUX_PKG_GROUPS/#, /}" | awk '{ printf "group = %s\n", $1 }'
fi
} > .PKGINFO
# Build metadata.

View File

@ -134,6 +134,7 @@ termux_step_setup_variables() {
TERMUX_PKG_SUGGESTS=""
TERMUX_PKG_TMPDIR=$TERMUX_TOPDIR/$TERMUX_PKG_NAME/tmp
TERMUX_PKG_SERVICE_SCRIPT=() # Fill with entries like: ("daemon name" 'script to execute'). Script is echoed with -e so can contain \n for multiple lines
TERMUX_PKG_GROUPS="" # https://wiki.archlinux.org/title/Pacman#Installing_package_groups
unset CFLAGS CPPFLAGS LDFLAGS CXXFLAGS
}