summaryrefslogtreecommitdiff
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD64
1 files changed, 52 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 074698b..71d23a9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,16 +9,16 @@
# Parabola version patch script does not apply consistently
# Parabola version lacks graysky gcc patch with bdver2 fix
# Parabola version lacks ath9k regdom and raid6 algo patches
-# Parabola version allows SEED, SM3, SM4, and Streebog
-# Parabola version allows insecure filesystems
# Parabola version is 300 Hz
# Parabola version supports Intel ME
# Parabola version is not configured for openrc
-# Parabola version builds docs using python and graphviz
+# Parabola version allows insecure filesystems
+# Parabola version enables ISDN and Infiniband
+# Parabola version enables VMware and HyperV
pkgbase=linux-libre-hardened
-_majver=5.1
-_minver=21
+_majver=5.2
+_minver=4
if [ "$_minver" == "0" ]; then
_pkgver=${_majver}
else
@@ -34,7 +34,10 @@ pkgrel=1
url='https://github.com/anthraxx/linux-hardened'
arch=('x86_64')
license=('GPL2')
-makedepends=('xmlto' 'kmod' 'inetutils' 'bc' 'libelf')
+makedepends=(
+ 'xmlto' 'kmod' 'inetutils' 'bc' 'libelf'
+ 'python-sphinx' 'python-sphinx_rtd_theme' 'graphviz' 'imagemagick'
+ )
conflicts=('linux-hardened')
options=('!strip')
source=(
@@ -42,6 +45,8 @@ source=(
https://linux-libre.fsfla.org/pub/linux-libre/releases/${_gnupkgver}/patch-${_gnumajver}-${_gnupkgver}.xz{,.sign}
https://github.com/anthraxx/linux-hardened/releases/download/${pkgver}/linux-hardened-${pkgver}.patch{,.sig}
0003-iwlwifi-mvm-disable-TX-AMSDU-on-older-NICs.patch
+ 0004-iwlwifi-Add-support-for-SAR-South-Korea-limitation.patch
+ 0005-netfilter-nf_tables-fix-module-autoload-for-redir.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
@@ -51,18 +56,20 @@ source=(
90-linux.hook # pacman hook for initramfs regeneration
linux.preset # standard config files for mkinitcpio ramdisk
)
-sha256sums=('94ad2e0d4d94c3ff2d2c7b37b0f90bc99ea37ed2db3a684a41f5a23411697b94'
+sha256sums=('abbf0a5cacc1031e55f181f61b3c417bd3a37d0960f7596cbcae6ee1b96439e9'
'SKIP'
- 'ce70142647bb393613365d9e7d4af961156f7b800d9bea803dc88d9a2bb652cb'
+ '127aecd13eed0c65a65c69557e5d82100139c191444b51373041ae6de346929c'
'SKIP'
- '2c8a96b3404712c7f7c9d97697bf89362fb0c08795e984c0b37683788ab32ad5'
+ '9c2daa260faf1cc63de68161eb2032516af024e8da5a0772a0d492a1983521aa'
'SKIP'
'8449de698dfc8f95ff03dbfd98b6abdd71dbc4238896256690cb856fe366aac3'
+ 'bcace026000869cffe107e33ba4facba93f2fda9a5a3c65b7576e30b7ee2c8d3'
+ 'f6eac8cc5a9e4f186d277b8679f78c1da14a42eeab40370f4f52ec5181af39a8'
'5d078323fc39482a8f828f721e55246d061914602f0cdadaa4787de50a2a6228'
'2466fb4aecc66d1b258b4cbdb2f215b5099f266d8c4386bb62ad1a0acd0caf5b'
'e7ebf050c22bcec0028c0b3c79fd6d3913b0370ecc6a23dfe78ce475630cf503'
'0f81d6e4158b7beeb0eb514f1b9401f7e23699cb0f7b0d513e25dae1815daaeb'
- '3e36d4c4673c1b1d39ffe232ecea2fc562ea53b407c6517d29b3944e0acb2cd4'
+ '2689476cb06f7744c243eaf054bc95468ef316ffda2f0cc5528db70e7a5d2ecb'
'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
'75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65')
@@ -86,6 +93,8 @@ prepare() {
# Hotfixes
msg2 "Applying hotfixes"
patch -p1 -i ../0003-iwlwifi-mvm-disable-TX-AMSDU-on-older-NICs.patch
+ patch -p1 -i ../0004-iwlwifi-Add-support-for-SAR-South-Korea-limitation.patch
+ patch -p1 -i ../0005-netfilter-nf_tables-fix-module-autoload-for-redir.patch
# linux hardened patch
msg2 "Applying hardened patch"
@@ -155,7 +164,7 @@ prepare() {
build() {
cd $_srcname
- make bzImage modules
+ make bzImage modules htmldocs
}
_package() {
@@ -296,7 +305,38 @@ _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"
+
+ local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
+
+ cd $_srcname
+
+ 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}")