Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: control extra pacman packages with PACMAN_EXTRAPACKAGES

Introduce the PACMAN_EXTRAPACKAGES variable in PKGBUILD to allow users
to specify which additional packages are built by the pacman-pkg target.

Previously, the api-headers package was always included, and the headers
package was included only if CONFIG_MODULES=y. With this change, both
headers and api-headers packages are included by default. Users can now
control this behavior by setting PACMAN_EXTRAPACKAGES to a
space-separated list of desired extra packages or leaving it empty to
exclude all.

For example, to build only the base package without extras:

make pacman-pkg PACMAN_EXTRAPACKAGES=""

Signed-off-by: Jose Fernandez <jose.fernandez@linux.dev>
Reviewed-by: Peter Jung <ptr1337@cachyos.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Christian Heusel <christian@heusel.eu>
Tested-by: Christian Heusel <christian@heusel.eu>
Acked-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by

Jose Fernandez and committed by
Masahiro Yamada
e6b65ee1 7a7f9745

+12 -6
+12 -6
scripts/package/PKGBUILD
··· 3 3 # Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org> 4 4 5 5 pkgbase=${PACMAN_PKGBASE:-linux-upstream} 6 - pkgname=("${pkgbase}" "${pkgbase}-api-headers") 7 - if grep -q CONFIG_MODULES=y include/config/auto.conf; then 8 - pkgname+=("${pkgbase}-headers") 9 - fi 6 + pkgname=("${pkgbase}") 7 + 8 + _extrapackages=${PACMAN_EXTRAPACKAGES-headers api-headers} 9 + for pkg in $_extrapackages; do 10 + pkgname+=("${pkgbase}-${pkg}") 11 + done 12 + 10 13 pkgver="${KERNELRELEASE//-/_}" 11 14 # The PKGBUILD is evaluated multiple times. 12 15 # Running scripts/build-version from here would introduce inconsistencies. ··· 80 77 cd "${objtree}" 81 78 local builddir="${pkgdir}/usr/${MODLIB}/build" 82 79 83 - echo "Installing build files..." 84 - "${srctree}/scripts/package/install-extmod-build" "${builddir}" 80 + if grep -q CONFIG_MODULES=y include/config/auto.conf; then 81 + echo "Installing build files..." 82 + "${srctree}/scripts/package/install-extmod-build" "${builddir}" 83 + fi 85 84 86 85 echo "Installing System.map and config..." 86 + mkdir -p "${builddir}" 87 87 cp System.map "${builddir}/System.map" 88 88 cp .config "${builddir}/.config" 89 89