summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorYurii Kolesnykov2020-06-18 16:33:30 +0300
committerYurii Kolesnykov2020-06-18 16:34:00 +0300
commite66e2ca0abfc11663d4090dfecb37ac0f6433ded (patch)
tree932b689292f201c3724018f8db831a54dc705205 /PKGBUILD
parent970252f2af3a5fe2bb4a8bdb83f1f491a92535a4 (diff)
downloadaur-e66e2ca0abfc11663d4090dfecb37ac0f6433ded.tar.gz
sync with testing/linux
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD105
1 files changed, 53 insertions, 52 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 03288af8f3cb..1ab5e31adeac 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,41 @@
-# Maintainer: Yurii Kolesnykov <root@yurikoles.com>
-#
-# Based on the linux-mainline package by:
-# Maintainer: Mikael Eriksson <mikael_eriksson@miffe.org>
-# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
-# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
-# Maintainer: Thomas Baechler <thomas@archlinux.org>
+# Maintainer: Yurii Kolesykov <root@yurikoles.com>
+# based on testing/linux: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
pkgbase=linux-drm-next-git
-pkgdesc='Linux kernel with DRM patches'
-_srcname=$pkgbase
-_kernel_rel=5.2
+pkgdesc='Linux kernel with bleeding-edge GPU drivers'
+url='https://cgit.freedesktop.org/drm/drm'
+_product="${pkgbase%-git}"
_branch=drm-next
-_kernelname=${pkgbase#linux}
-pkgver=5.2.890707.b45f1b3b585e
+pkgver=5.8.917195.66057dd1d1cf
pkgrel=1
-arch=('x86_64')
-url='https://cgit.freedesktop.org/drm/drm'
+arch=(x86_64)
license=(GPL2)
makedepends=(
- bc kmod libelf
+ bc kmod libelf pahole
xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick
git
)
options=('!strip')
-source=("${pkgbase}::git://anongit.freedesktop.org/drm/drm#branch=${_branch}"
+_srcname="${pkgbase}"
+source=(
+ "${_srcname}::git://anongit.freedesktop.org/drm/drm#branch=${_branch}"
config # the main kernel config file
+ sphinx-workaround.patch
+ gcc10-early-boot-fix.patch
+ wno-maybe-initialized.patch
)
sha256sums=('SKIP'
- '73ddc4e25084b4089a39d9b1ade74b9c14a215f90752f218ab0679407db4cc50')
+ '623601ed9d7879dd9dba1cd50fc8051f9db508b49b4fc0c47c5a9eb9165fc04e'
+ '8cb21e0b3411327b627a9dd15b8eb773295a0d2782b1a41b2a8839d1b2f5778c'
+ '8c8fb0be88fcd767e8768ee1bde491e8b4de83f6a644e002019d1d5a0da920f9'
+ 'b4e60ef20c47093ec47867439d057d936c6ba8384cc47a0d0737830c48bea63a')
pkgver() {
cd "${_srcname}"
+ local version="$(grep \^VERSION Makefile|cut -d"=" -f2|cut -d" " -f2)"
+ local patch="$(grep \^PATCHLEVEL Makefile|cut -d"=" -f2|cut -d" " -f2)"
+ patch=$(( $patch + 1 ))
- echo ${_kernel_rel}.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
+ echo $version.$patch.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
export KBUILD_BUILD_HOST=archlinux
@@ -41,7 +45,7 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP
prepare() {
cd $_srcname
- msg2 "Setting version..."
+ echo "Setting version..."
scripts/setlocalversion --save-scmversion
echo "-$pkgrel" > localversion.10-pkgrel
echo "${pkgbase#linux}" > localversion.20-pkgname
@@ -51,34 +55,37 @@ prepare() {
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
- msg2 "Applying patch $src..."
+ echo "Applying patch $src..."
patch -Np1 < "../$src"
done
- msg2 "Setting config..."
+ echo "Setting config..."
cp ../config .config
make olddefconfig
make -s kernelrelease > version
- msg2 "Prepared %s version %s" "$pkgbase" "$(<version)"
+ echo "Prepared $pkgbase version $(<version)"
}
build() {
cd $_srcname
- make bzImage modules htmldocs
+ make all
+ make htmldocs
}
-_package() {
+_package-git() {
pkgdesc="The $pkgdesc kernel and modules"
depends=(coreutils kmod initramfs)
optdepends=('crda: 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-arch wireguard-arch)
cd $_srcname
local kernver="$(<version)"
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
- msg2 "Installing boot image..."
+ 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"
@@ -86,23 +93,20 @@ _package() {
# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
- msg2 "Installing modules..."
- make INSTALL_MOD_PATH="$pkgdir/usr" modules_install
+ echo "Installing modules..."
+ make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install
# remove build and source links
rm "$modulesdir"/{source,build}
-
- msg2 "Fixing permissions..."
- chmod -Rc u=rwX,go=rX "$pkgdir"
}
-_package-headers() {
+_package-headers-git() {
pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
- msg2 "Installing build files..."
+ echo "Installing build files..."
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
localversion.* version vmlinux
install -Dt "$builddir/kernel" -m644 kernel/Makefile
@@ -115,7 +119,7 @@ _package-headers() {
# add xfs and shmem for aufs building
mkdir -p "$builddir"/{fs/xfs,mm}
- msg2 "Installing headers..."
+ echo "Installing headers..."
cp -t "$builddir" -a include
cp -t "$builddir/arch/x86" -a arch/x86/include
install -Dt "$builddir/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
@@ -131,10 +135,10 @@ _package-headers() {
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
- msg2 "Installing KConfig files..."
+ echo "Installing KConfig files..."
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
- msg2 "Removing unneeded architectures..."
+ echo "Removing unneeded architectures..."
local arch
for arch in "$builddir"/arch/*/; do
[[ $arch = */x86/ ]] && continue
@@ -142,16 +146,16 @@ _package-headers() {
rm -r "$arch"
done
- msg2 "Removing documentation..."
+ echo "Removing documentation..."
rm -r "$builddir/Documentation"
- msg2 "Removing broken symlinks..."
+ echo "Removing broken symlinks..."
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
- msg2 "Removing loose objects..."
+ echo "Removing loose objects..."
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
- msg2 "Stripping build tools..."
+ echo "Stripping build tools..."
local file
while read -rd '' file; do
case "$(file -bi "$file")" in
@@ -166,21 +170,21 @@ _package-headers() {
esac
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
- msg2 "Adding symlink..."
+ echo "Stripping vmlinux..."
+ strip -v $STRIP_STATIC "$builddir/vmlinux"
+
+ echo "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
-
- msg2 "Fixing permissions..."
- chmod -Rc u=rwX,go=rX "$pkgdir"
}
-_package-docs() {
+_package-docs-git() {
pkgdesc="Documentation for the $pkgdesc kernel"
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
- msg2 "Installing documentation..."
+ echo "Installing documentation..."
local src dst
while read -rd '' src; do
dst="${src#Documentation/}"
@@ -188,18 +192,15 @@ _package-docs() {
install -Dm644 "$src" "$dst"
done < <(find Documentation -name '.*' -prune -o ! -type d -print0)
- msg2 "Adding symlink..."
+ echo "Adding symlink..."
mkdir -p "$pkgdir/usr/share/doc"
ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
-
- msg2 "Fixing permissions..."
- chmod -Rc u=rwX,go=rX "$pkgdir"
}
-pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs")
+pkgname=("$pkgbase" "$_product-headers-git" "$_product-docs-git")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
- $(declare -f "_package${_p#$pkgbase}")
- _package${_p#$pkgbase}
+ $(declare -f "_package${_p#$_product}")
+ _package${_p#$_product}
}"
done