summaryrefslogtreecommitdiff
path: root/scripts/package/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package/PKGBUILD')
-rw-r--r--scripts/package/PKGBUILD18
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/package/PKGBUILD b/scripts/package/PKGBUILD
index 663ce300dd06..fbd7eb10a52c 100644
--- a/scripts/package/PKGBUILD
+++ b/scripts/package/PKGBUILD
@@ -3,10 +3,13 @@
# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
pkgbase=${PACMAN_PKGBASE:-linux-upstream}
-pkgname=("${pkgbase}" "${pkgbase}-api-headers")
-if grep -q CONFIG_MODULES=y include/config/auto.conf; then
- pkgname+=("${pkgbase}-headers")
-fi
+pkgname=("${pkgbase}")
+
+_extrapackages=${PACMAN_EXTRAPACKAGES-headers api-headers}
+for pkg in $_extrapackages; do
+ pkgname+=("${pkgbase}-${pkg}")
+done
+
pkgver="${KERNELRELEASE//-/_}"
# The PKGBUILD is evaluated multiple times.
# Running scripts/build-version from here would introduce inconsistencies.
@@ -77,10 +80,13 @@ _package-headers() {
cd "${objtree}"
local builddir="${pkgdir}/usr/${MODLIB}/build"
- echo "Installing build files..."
- "${srctree}/scripts/package/install-extmod-build" "${builddir}"
+ if grep -q CONFIG_MODULES=y include/config/auto.conf; then
+ echo "Installing build files..."
+ "${srctree}/scripts/package/install-extmod-build" "${builddir}"
+ fi
echo "Installing System.map and config..."
+ mkdir -p "${builddir}"
cp System.map "${builddir}/System.map"
cp .config "${builddir}/.config"