pkg/arch/kernel: Update PKGBUILD
This commit is contained in:
parent
87b061820a
commit
044ec4cff7
|
@ -1,3 +1,4 @@
|
||||||
|
# Maintainer: Maximilian Luz <m@mxnluz.io>
|
||||||
# Maintainer: Blaž Hrastnik <blaz@mxxn.io>
|
# Maintainer: Blaž Hrastnik <blaz@mxxn.io>
|
||||||
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
|
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
|
||||||
|
|
||||||
|
@ -12,7 +13,7 @@ url="https://github.com/archlinux/linux/commits/$_srctag"
|
||||||
arch=(x86_64)
|
arch=(x86_64)
|
||||||
license=(GPL2)
|
license=(GPL2)
|
||||||
makedepends=(
|
makedepends=(
|
||||||
bc kmod libelf cpio perl tar xz
|
bc libelf cpio perl tar xz
|
||||||
python
|
python
|
||||||
# we don't need `pahole` as deps because we disable `CONFIG_DEBUG_INFO`
|
# we don't need `pahole` as deps because we disable `CONFIG_DEBUG_INFO`
|
||||||
# ignoring deps for docs because we don't build docs package
|
# ignoring deps for docs because we don't build docs package
|
||||||
|
@ -110,9 +111,9 @@ build() {
|
||||||
_package() {
|
_package() {
|
||||||
pkgdesc="The $pkgdesc kernel and modules"
|
pkgdesc="The $pkgdesc kernel and modules"
|
||||||
depends=(coreutils kmod initramfs)
|
depends=(coreutils kmod initramfs)
|
||||||
optdepends=('crda: to set the correct wireless channels of your country'
|
optdepends=('wireless-regdb: to set the correct wireless channels of your country'
|
||||||
'linux-firmware: firmware images needed for some devices')
|
'linux-firmware: firmware images needed for some devices')
|
||||||
provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE linux=${_shortver})
|
provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE linux=${_shortver})
|
||||||
replaces=(virtualbox-guest-modules-arch wireguard-arch)
|
replaces=(virtualbox-guest-modules-arch wireguard-arch)
|
||||||
|
|
||||||
cd $_srcname
|
cd $_srcname
|
||||||
|
@ -129,13 +130,14 @@ _package() {
|
||||||
echo "Installing boot image..."
|
echo "Installing boot image..."
|
||||||
# systemd expects to find the kernel here to allow hibernation
|
# systemd expects to find the kernel here to allow hibernation
|
||||||
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
|
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
|
||||||
install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
|
install -Dm644 "$image_name" "$modulesdir/vmlinuz"
|
||||||
|
|
||||||
# Used by mkinitcpio to name the kernel
|
# Used by mkinitcpio to name the kernel
|
||||||
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
|
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
|
||||||
|
|
||||||
echo "Installing modules..."
|
echo "Installing modules..."
|
||||||
make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install
|
make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
|
||||||
|
DEPMOD=/doesnt/exist modules_install # Suppress depmod
|
||||||
|
|
||||||
# remove build and source links
|
# remove build and source links
|
||||||
rm "$modulesdir"/{source,build}
|
rm "$modulesdir"/{source,build}
|
||||||
|
@ -143,6 +145,7 @@ _package() {
|
||||||
|
|
||||||
_package-headers() {
|
_package-headers() {
|
||||||
pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
|
pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
|
||||||
|
depends=(pahole)
|
||||||
provides=("linux-headers=${_shortver}")
|
provides=("linux-headers=${_shortver}")
|
||||||
|
|
||||||
cd $_srcname
|
cd $_srcname
|
||||||
|
@ -155,12 +158,9 @@ _package-headers() {
|
||||||
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
|
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
|
||||||
cp -t "$builddir" -a scripts
|
cp -t "$builddir" -a scripts
|
||||||
|
|
||||||
# add objtool for external module building and enabled VALIDATION_STACK option
|
# required when STACK_VALIDATION is enabled
|
||||||
install -Dt "$builddir/tools/objtool" tools/objtool/objtool
|
install -Dt "$builddir/tools/objtool" tools/objtool/objtool
|
||||||
|
|
||||||
# add xfs and shmem for aufs building
|
|
||||||
mkdir -p "$builddir"/{fs/xfs,mm}
|
|
||||||
|
|
||||||
echo "Installing headers..."
|
echo "Installing headers..."
|
||||||
cp -t "$builddir" -a include
|
cp -t "$builddir" -a include
|
||||||
cp -t "$builddir/arch/x86" -a arch/x86/include
|
cp -t "$builddir/arch/x86" -a arch/x86/include
|
||||||
|
@ -177,6 +177,9 @@ _package-headers() {
|
||||||
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
|
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
|
||||||
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
|
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
|
||||||
|
|
||||||
|
# https://bugs.archlinux.org/task/71392
|
||||||
|
install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
|
||||||
|
|
||||||
echo "Installing KConfig files..."
|
echo "Installing KConfig files..."
|
||||||
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
|
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue