summaryrefslogtreecommitdiff
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD137
1 files changed, 69 insertions, 68 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9a87bed..a822f9e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,6 @@
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
# Maintainer (Arch): Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
-# Maintainer (Arch): Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Aqua-sama <aqua@iserlohn-fortress.net>
-# Contributor (Arch): Thomas Baechler <thomas@archlinux.org>
# # I maintain this because:
# Arch version patch script does not apply consistently
@@ -13,39 +11,41 @@
# Arch version uses git
pkgbase=linux
-_supver=5
-_majver=3
-_minver=7
+_majver=5.3
+_minver=8
+_gccpatchver='20190822'
if [ "$_minver" == "0" ]; then
- pkgver=${_supver}.${_majver}
+ pkgver=${_majver}
else
- pkgver=${_supver}.${_majver}.${_minver}
+ pkgver=${_majver}.${_minver}
fi
-_srcname=linux-${pkgver}
-_gccpatchver='20190822'
-pkgrel=2
+pkgrel=1
url='https://kernel.org'
-arch=('x86_64')
-license=('GPL2')
+arch=(x86_64)
+license=(GPL2)
makedepends=(
- 'xmlto' 'kmod' 'inetutils' 'bc' 'libelf'
- )
+ xmlto kmod inetutils bc libelf
+ python-sphinx python-sphinx_rtd_theme graphviz imagemagick
+)
conflicts=('linux-libre')
options=('!strip')
+_srcname=linux-${pkgver}
source=(
- https://www.kernel.org/pub/linux/kernel/v${_supver}.x/linux-$pkgver.tar.{xz,sign}
- 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch
- 0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-of-hidp_send_message.patch
- graysky_bdver2-hotfix.patch
- kernel_gcc_patch-${_gccpatchver}.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/${_gccpatchver}.tar.gz
- ath9k-regdom-hack.patch
- raid6-default-algo.patch
- config.x86_64 # the main kernel config files
- 60-linux.hook # pacman hook for depmod
- 90-linux.hook # pacman hook for initramfs regeneration
- linux.preset # standard config files for mkinitcpio ramdisk
- )
-sha256sums=('c6c9714e21531c825c306b107bc6f6c7bfa2d5270a14bad170f8de5a73d34802'
+ https://www.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.{xz,sign}
+ 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-CLONE_NEWUSER.patch
+ 0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-of-hidp_send_message.patch
+ graysky_bdver2-hotfix.patch
+ kernel_gcc_patch-${_gccpatchver}.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/${_gccpatchver}.tar.gz
+ ath9k-regdom-hack.patch
+ raid6-default-algo.patch
+ config # the main kernel config file
+)
+validpgpkeys=(
+ 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
+ '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
+)
+# https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc
+sha256sums=('78f3cfc6c20b10ff21c0bb22d7d257cab03781c44d8c5aae289f749f94f76649'
'SKIP'
'e862ecd2cb0b20e1859ec3e47616457a9a3acb111cd5a86094f9ed1dbd7f42ac'
'9b92add42581aeb427a0c2cffc584815f0e4223a1a6bc27802ccd77eaf6e4bec'
@@ -53,16 +53,8 @@ sha256sums=('c6c9714e21531c825c306b107bc6f6c7bfa2d5270a14bad170f8de5a73d34802'
'8c11086809864b5cef7d079f930bd40da8d0869c091965fa62e95de9a0fe13b5'
'e7ebf050c22bcec0028c0b3c79fd6d3913b0370ecc6a23dfe78ce475630cf503'
'0f81d6e4158b7beeb0eb514f1b9401f7e23699cb0f7b0d513e25dae1815daaeb'
- '1360eec919d7249f79fe975064be7faa54dc792cace9c233d40780f075a2baeb'
- '452b8d4d71e1565ca91b1bebb280693549222ef51c47ba8964e411b2d461699c'
- '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
- 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65')
-validpgpkeys=(
- 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
- '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
- )
+ 'dc5c61258073c5c88eff6d76037d8b56c5b2111be3edccd33e2c62aa6033fc7e')
-_kernelname=${pkgbase#linux}
#export KBUILD_BUILD_HOST=arc4linux
export KBUILD_BUILD_USER=$pkgbase
export KBUILD_BUILD_TIMESTAMP="@${SOURCE_DATE_EPOCH:-$(date +%s)}"
@@ -73,7 +65,7 @@ prepare() {
# add upstream patch
# if [ "$_minver" != "0" ]; then
# msg2 "Applying upstream patch"
-# patch -Np1 < ../patch-${_supver}.${_majver}-${_pkgver}
+# patch -Np1 < ../patch-${_majver}-${_pkgver}
# fi
@@ -104,7 +96,7 @@ prepare() {
msg2 "Setting version..."
scripts/setlocalversion --save-scmversion
echo "-$pkgrel" > localversion.10-pkgrel
- echo "$_kernelname" > localversion.20-pkgname
+ echo "${pkgbase#linux}" > localversion.20-pkgname
msg2 "Setting config..."
@@ -112,7 +104,7 @@ prepare() {
# if [ -f ${SRCDEST}/config.previous ]; then
# cp ${SRCDEST}/config.previous .config
# else
- cp ../config.x86_64 .config
+ cp ../config .config
# fi
make olddefconfig
@@ -144,54 +136,33 @@ prepare() {
build() {
cd $_srcname
- make bzImage modules
+ make bzImage modules htmldocs
}
_package() {
pkgdesc="The ${pkgbase/linux/Linux} kernel and modules"
- depends=(coreutils kmod mkinitcpio)
+ depends=(coreutils kmod initramfs)
optdepends=('crda: to set the correct wireless channels of your country'
'linux-firmware: firmware images needed for some devices')
- backup=("etc/mkinitcpio.d/$pkgbase.preset")
- install=linux.install
cd $_srcname
-
local kernver="$(<version)"
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
msg2 "Installing boot image..."
- install -Dm644 "$(make -s image_name)" "$pkgdir/boot/vmlinuz-$pkgbase"
+ # 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"
# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
msg2 "Installing modules..."
- mkdir -p "$modulesdir"
make INSTALL_MOD_PATH="$pkgdir/usr" modules_install
# remove build and source links
rm "$modulesdir"/{source,build}
- msg2 "Installing hooks..."
- # sed expression for following substitutions
- local subst="
- s|%PKGBASE%|$pkgbase|g
- s|%KERNVER%|$kernver|g
- "
-
- # hack to allow specifying an initially nonexisting install file
- sed "$subst" "$startdir/$install" > "$startdir/$install.pkg"
- true && install=$install.pkg
-
- # fill in mkinitcpio preset and pacman hooks
- sed "$subst" ../linux.preset | install -Dm644 /dev/stdin \
- "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset"
- sed "$subst" ../60-linux.hook | install -Dm644 /dev/stdin \
- "$pkgdir/usr/share/libalpm/hooks/60-$pkgbase.hook"
- sed "$subst" ../90-linux.hook | install -Dm644 /dev/stdin \
- "$pkgdir/usr/share/libalpm/hooks/90-$pkgbase.hook"
-
msg2 "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"
}
@@ -200,11 +171,11 @@ _package-headers() {
pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel"
cd $_srcname
-
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
msg2 "Installing build files..."
- install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map localversion.* version vmlinux
+ install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
+ localversion.* version vmlinux
install -Dt "$builddir/kernel" -m644 kernel/Makefile
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
cp -t "$builddir" -a scripts
@@ -276,7 +247,37 @@ _package-headers() {
chmod -Rc u=rwX,go=rX "$pkgdir"
}
-pkgname=("$pkgbase" "$pkgbase-headers")
+_package-docs() {
+ pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase/linux/Linux} kernel"
+
+ cd $_srcname
+ local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
+
+ msg2 "Installing documentation..."
+ mkdir -p "$builddir"
+ cp -t "$builddir" -a Documentation
+
+ msg2 "Removing doctrees..."
+ rm -r "$builddir/Documentation/output/.doctrees"
+
+ msg2 "Moving HTML docs..."
+ local src dst
+ while read -rd '' src; do
+ dst="$builddir/Documentation/${src#$builddir/Documentation/output/}"
+ mkdir -p "${dst%/*}"
+ mv "$src" "$dst"
+ rmdir -p --ignore-fail-on-non-empty "${src%/*}"
+ done < <(find "$builddir/Documentation/output" -type f -print0)
+
+ msg2 "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")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")