diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 79 |
1 files changed, 55 insertions, 24 deletions
@@ -5,30 +5,43 @@ pkgbase=linux-hardened-git _srcname=${pkgbase/-git/} -_gitbranch=5.17 -pkgver=5.17.5.r1076480.g15066880c14f +_gitbranch=6.7 +pkgver=6.7.r1235754.gf18e7b54b04b pkgrel=1 pkgdesc='Security-Hardened Linux' url='https://github.com/anthraxx/linux-hardened' arch=(x86_64) license=(GPL2) makedepends=( - bc libelf pahole cpio perl tar xz - xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick texlive-latexextra + bc + cpio + gettext git + libelf + pahole + perl + python + tar + xz + + # htmldocs + graphviz + imagemagick + python-sphinx + texlive-latexextra ) options=('!strip') source=( "${_srcname}::git+https://github.com/anthraxx/linux-hardened#branch=${_gitbranch}?signed" - config # the main kernel config files + config # the main kernel config file ) validpgpkeys=( - 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds - '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman - 'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak + ABAF11C65A2970B130ABE3C479BE3E4300411886 # Linus Torvalds + 647F28654894E3BD457199BE38DBBDC86092693E # Greg Kroah-Hartman + E240B57E2C4630BA768E2F26FC1B547C8D8172C8 # Levente Polyak ) sha256sums=('SKIP' - 'dad3d8436c34cf14e44d767f9a3a587004a4de124e20c6a356c02b873776e223') + '45236d37e2f07bb9fae5f41f18554fe44c8ab24f4ba6e1c75713847520c47904') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase @@ -49,8 +62,6 @@ prepare() { cd $_srcname echo "Setting version..." - rm -f localversion* include/config/kernel.release - scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname echo "-r$(git rev-list --count HEAD)" > localversion.30-revision @@ -59,6 +70,7 @@ prepare() { for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" + src="${src%.zst}" [[ $src = *.patch ]] || continue echo "Applying patch $src..." patch -Np1 < "../$src" @@ -75,21 +87,36 @@ prepare() { build() { cd $_srcname + + make htmldocs & + local pid_docs=$! + make all - make htmldocs + wait "${pid_docs}" } _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' - 'usbctl: deny_new_usb control') - provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE) + depends=( + coreutils + initramfs + kmod + ) + optdepends=( + 'wireless-regdb: to set the correct wireless channels of your country' + 'linux-firmware: firmware images needed for some devices' + 'usbctl: deny_new_usb control' + ) + provides=( + KSMBD-MODULE + VIRTUALBOX-GUEST-MODULES + WIREGUARD-MODULE + ) + replaces=( + ) 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 @@ -100,11 +127,11 @@ _package() { echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase" echo "Installing modules..." - make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \ + ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \ DEPMOD=/doesnt/exist modules_install # Suppress depmod - # remove build and source links - rm "$modulesdir"/{source,build} + # remove build link + rm "$modulesdir"/build } _package-headers() { @@ -169,7 +196,7 @@ _package-headers() { echo "Stripping build tools..." local file while read -rd '' file; do - case "$(file -bi "$file")" in + case "$(file -Sib "$file")" in application/x-sharedlib\;*) # Libraries (.so) strip -v $STRIP_SHARED "$file" ;; application/x-archive\;*) # Libraries (.a) @@ -208,7 +235,11 @@ _package-docs() { ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase" } -pkgname=(linux-hardened-git linux-hardened-headers-git linux-hardened-docs-git) +pkgname=( + linux-hardened-git + linux-hardened-headers-git + linux-hardened-docs-git +) for _p in "${pkgname[@]}"; do _p=${_p/-git/} eval "package_$_p-git() { |