summaryrefslogtreecommitdiff
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD131
1 files changed, 66 insertions, 65 deletions
diff --git a/PKGBUILD b/PKGBUILD
index fe6a873..0d135f1 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:
# Parabola version patch script does not apply consistently
@@ -14,42 +12,43 @@
pkgbase=linux-libre
_supver=5
_majver=3
-_minver=7
+_minver=8
+_gccpatchver='20190822'
if [ "$_minver" == "0" ]; then
pkgver=${_supver}.${_majver}
else
pkgver=${_supver}.${_majver}.${_minver}
fi
-_srcname=linux-${_supver}.${_majver}
-_gnumajver=${_supver}.${_majver}-gnu
-_gnupkgver=${pkgver}-gnu
-_gccpatchver='20190822'
-pkgrel=2
+pkgrel=1
url='https://linux-libre.fsfla.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')
options=('!strip')
+_srcname=linux-${_supver}.${_majver}
+_gnumajver=${_supver}.${_majver}-gnu
+_gnupkgver=${pkgver}-gnu
source=(
- https://linux-libre.fsfla.org/pub/linux-libre/releases/${_gnumajver}/linux-libre-${_gnumajver}.tar.xz{,.sign}
- https://linux-libre.fsfla.org/pub/linux-libre/releases/${_gnupkgver}/patch-${_gnumajver}-${_gnupkgver}.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
- )
+ https://linux-libre.fsfla.org/pub/linux-libre/releases/${_gnumajver}/linux-libre-${_gnumajver}.tar.xz{,.sign}
+ https://linux-libre.fsfla.org/pub/linux-libre/releases/${_gnupkgver}/patch-${_gnumajver}-${_gnupkgver}.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=(
+ '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva
+)
sha256sums=('c50879645e8f13a6a39a86748a8cd259b4ecd2191c88ef772b4432c993820c0a'
'SKIP'
- '62a46a51f2f09ba0fa7f02ff812044542c3cb4fb169e2c66e91a614025b5606c'
+ '1741f9e31b882496addadb9bc6f212a32502ad0904a14b7b6c57ddd16b6258d0'
'SKIP'
'e862ecd2cb0b20e1859ec3e47616457a9a3acb111cd5a86094f9ed1dbd7f42ac'
'9b92add42581aeb427a0c2cffc584815f0e4223a1a6bc27802ccd77eaf6e4bec'
@@ -57,15 +56,8 @@ sha256sums=('c50879645e8f13a6a39a86748a8cd259b4ecd2191c88ef772b4432c993820c0a'
'8c11086809864b5cef7d079f930bd40da8d0869c091965fa62e95de9a0fe13b5'
'e7ebf050c22bcec0028c0b3c79fd6d3913b0370ecc6a23dfe78ce475630cf503'
'0f81d6e4158b7beeb0eb514f1b9401f7e23699cb0f7b0d513e25dae1815daaeb'
- '619025633950b6fc546fe979561bc67786ce2c94b38efee4275ae44cbcbfaa3b'
- '452b8d4d71e1565ca91b1bebb280693549222ef51c47ba8964e411b2d461699c'
- '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
- 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65')
-validpgpkeys=(
- '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva
- )
+ '84ed45812dcb2ffe3832f7ef12f732850e8b59f5870f870b3459d6e5d7b21d4f')
-_kernelname=${pkgbase#linux-libre}
#export KBUILD_BUILD_HOST=arc4linux
export KBUILD_BUILD_USER=$pkgbase
export KBUILD_BUILD_TIMESTAMP="@${SOURCE_DATE_EPOCH:-$(date +%s)}"
@@ -108,7 +100,7 @@ prepare() {
sed -e "/^EXTRAVERSION =/s/=.*/= /" -i Makefile
scripts/setlocalversion --save-scmversion
echo "-$pkgrel" > localversion.10-pkgrel
- echo "-libre$_kernelname" > localversion.20-pkgname
+ echo "${pkgbase#linux-libre}" > localversion.20-pkgname
msg2 "Setting config..."
@@ -116,7 +108,7 @@ prepare() {
# if [ -f ${SRCDEST}/config.libre.previous ]; then
# cp ${SRCDEST}/config.libre.previous .config
# else
- cp ../config.x86_64 .config
+ cp ../config .config
# fi
make olddefconfig
@@ -148,54 +140,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-libre-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"
}
@@ -204,11 +175,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
@@ -280,7 +251,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}")