ports/main/linux-headers/APKBUILD

88 lines
1.8 KiB
Plaintext

# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
pkgname=linux-headers
majorver=6
minorver=5
patchver=1
_patches="
"
pkgver="$majorver.$minorver"
pkgrel=0
if [ "$patchver" != 0 ]; then
_patches="
$_patches
linux-$majorver.$minorver.$patchver.patch.xz::https://cdn.kernel.org/pub/linux/kernel/v$majorver.x/patch-$majorver.$minorver.$patchver.xz
"
pkgver="$pkgver.$patchver"
fi
_kbdir="linux-$majorver.$minorver"
source="
https://cdn.kernel.org/pub/linux/kernel/v$majorver.x/linux-$majorver.$minorver.tar.gz
$_patches
$_configs
"
_kabi= _klocalver= _kconfig= _kbdmain= _kbddev= _kflavour=
_kdir_src="$srcdir/$_kbdir"
arch="noarch"
_depends_dev="
perl
gmp-dev
elfutils-dev
bash
flex
bison
"
makedepends="
$_depends_dev
sed
installkernel
bc
openssl-dev
diffutils
findutils
rsync
"
pkgdesc="Linux Kernel - Headers"
url="https://www.kernel.org"
license="GPL-2.0"
options="!strip"
builddir="$_kdir_src"
_carch=${CARCH} # abuild to kernel arch mapping
case "$_carch" in
aarch64*) _carch="arm64" ;;
arm*) _carch="arm" ;;
mips*) _carch="mips" ;;
ppc*) _carch="powerpc" ;;
s390*) _carch="s390" ;;
esac
package() {
local _outdir="$pkgdir/usr"
mkdir -p "$_outdir"
cd "$_kdir_src"
make headers_install \
ARCH="$_carch" \
INSTALL_HDR_PATH="$_outdir"
rm -f **/.install **/install.cmd
rm -rf "$_outdir/include/drm" # provided by libdrm-dev
}
sha512sums="
efc66eef13698e7210b7dd30ac5f664f64b4b186e6061b322b369d3e27a46e35696f3ee441b12928211992867a06042beb3d31903e469e0bd78c13895afa853e linux-6.5.tar.gz
27a6ec30ee6bf5d15a9cbdf48aca1ba4e171de0fac10f39b4d36e192fe3b2c6dc6163c9d768e4d2cee2df366d3a23e767a86e3786e6422b2c6eb3fb0b2354fe1 linux-6.5.1.patch.xz
"