summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMikael Eriksson2023-05-08 01:59:15 +0200
committerMikael Eriksson2023-05-08 01:59:15 +0200
commit76c1d8e6a253c2f983fb74b30fc4012c0c220a55 (patch)
treec301fb5c4c00d70475b998fd816b26ce6a7b7bf0 /PKGBUILD
parentf4da78ad652c7f8bc215b2b0e8bc2d1fdcb68481 (diff)
downloadaur-76c1d8e6a253c2f983fb74b30fc4012c0c220a55.tar.gz
Merge with core/linux 6.3.1.arch1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD79
1 files changed, 56 insertions, 23 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a3d112f0cf7a..f848c649e403 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,8 +3,6 @@
#
# Based on the linux package by:
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
-# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
-# Maintainer: Thomas Baechler <thomas@archlinux.org>
pkgbase=linux-mainline # Build stock -ARCH kernel
#pkgbase=linux-custom # Build kernel with a different name
@@ -16,9 +14,22 @@ arch=(x86_64)
url="https://kernel.org/"
license=(GPL2)
makedepends=(
- bc libelf pahole cpio perl tar xz gettext
- xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick texlive-latexextra
+ bc
+ cpio
+ gettext
git
+ libelf
+ pahole
+ perl
+ tar
+ xz
+
+ # htmldocs
+ graphviz
+ imagemagick
+ python-sphinx
+ texlive-latexextra
+ xmlto
)
options=('!strip')
_srcname=linux-mainline
@@ -32,19 +43,26 @@ validpgpkeys=(
'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig)
)
sha256sums=('SKIP'
- '3449f9cec5cb48f6804ef33a5575627ba769e57bdc43aba13a748d69cef5e73d')
+ '6b337a9d3cfdc00005589a80b8d36fa500f6a92ed21565a3aceec48d7202a7da')
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
+_make() {
+ test -s version
+ make KERNELRELEASE="$(<version)" "$@"
+}
+
prepare() {
cd $_srcname
- #echo "Setting version..."
- #scripts/setlocalversion
- #echo "-$pkgrel" > localversion.10-pkgrel
- #echo "${pkgbase#linux}" > localversion.20-pkgname
+ echo "Setting version..."
+ echo "-$pkgrel" > localversion.10-pkgrel
+ echo "${pkgbase#linux}" > localversion.20-pkgname
+ make defconfig
+ make -s kernelrelease > version
+ make mrproper
local src
for src in "${source[@]}"; do
@@ -57,40 +75,51 @@ prepare() {
echo "Setting config..."
cp ../config .config
- make olddefconfig
+ _make olddefconfig
diff -u ../config .config || :
- make -s kernelrelease > version
echo "Prepared $pkgbase version $(<version)"
}
build() {
cd $_srcname
- make htmldocs all
+ _make htmldocs all
}
_package() {
pkgdesc="The $pkgdesc kernel and modules"
- depends=(coreutils kmod initramfs)
- optdepends=('wireless-regdb: to set the correct wireless channels of your country'
- 'linux-firmware: firmware images needed for some devices')
- provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE)
- replaces=(virtualbox-guest-modules-mainline wireguard-mainline)
+ depends=(
+ coreutils
+ initramfs
+ kmod
+ )
+ optdepends=(
+ 'wireless-regdb: to set the correct wireless channels of your country'
+ 'linux-firmware: firmware images needed for some devices'
+ )
+ provides=(
+ KSMBD-MODULE
+ VIRTUALBOX-GUEST-MODULES
+ WIREGUARD-MODULE
+ )
+ replaces=(
+ virtualbox-guest-modules-arch
+ wireguard-arch
+ )
cd $_srcname
- local kernver="$(<version)"
- local modulesdir="$pkgdir/usr/lib/modules/$kernver"
+ local modulesdir="$pkgdir/usr/lib/modules/$(<version)"
echo "Installing boot image..."
# systemd expects to find the kernel here to allow hibernation
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
- install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
+ install -Dm644 "$(_make -s image_name)" "$modulesdir/vmlinuz"
# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
echo "Installing modules..."
- make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
+ _make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
DEPMOD=/doesnt/exist modules_install # Suppress depmod
# remove build and source links
@@ -106,7 +135,7 @@ _package-headers() {
echo "Installing build files..."
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
- version vmlinux
+ localversion.* version vmlinux
install -Dt "$builddir/kernel" -m644 kernel/Makefile
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
cp -t "$builddir" -a scripts
@@ -198,7 +227,11 @@ _package-docs() {
ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
}
-pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs")
+pkgname=(
+ "$pkgbase"
+ "$pkgbase-headers"
+ "$pkgbase-docs"
+)
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")