# Maintainer: NobodyDBG pkgbase=linux-vanilla-selinux-54 pkgname=linux-vanilla-selinux-54 pkgver=5.4.89 pkgrel=1 pkgdesc="Vanilla-Linux-Kernel (5.4) from kernel.org with Selinux enabled" arch=('x86_64') url="https://www.kernel.org/" license=('GPL2') makedepends=(bc kmod libelf xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick git) options=('!strip') _srcname=linux-vailla-selinux-54${pkgver} _origsrcname=linux-${pkgver} source=(https://www.kernel.org/pub/linux/kernel/v5.x/${_origsrcname}.tar.{xz,sign} 'config' # the main kernel config file 'linux-vanilla-selinux-54.install' # Installfile '60-linux.hook' # pacman hook for depmod '90-linux.hook' # pacman hook for initramfs regeneration 'linux-vanilla-selinux-54.preset' # standard config files for mkinitcpio ramdisk 'sphinx.patch' # Sphinx Patch for generating docs ) validpgpkeys=('ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman (Linux kernel stable release signing key) ) # https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc sha512sums=('b69793a9ad0807db409593bee12dd4998b21bdf43a4b07d212818f7f6b916cfadd4a599007f1989fc49425367cd5ba5094fc35e075bb796b2efb7502813e657e' '51e8cbd7c3add6b91029a963b79c14c80cdc968d4795cb0f4e805fc8e511e0dc05e1d07c7b78addaf982ae8e7f7864aeaa926110c77ea20a00bd42c55f39017c' '065cbf56b13e8feef689458636e099d163e3740154a779cf4293ec1601c1c318c529afdf745922eec8245891ec4927017c060020518e9ff25e330b2495c9db7b' 'fc52feda32be644deeadf267fdff124ffcc0d0870c36e736024a7be0958ba4b50cea5ef0ec33c2681ad00f36b42ebed354fa3e63bd4827acbeedebc39029229c' '7132a74149b39e30f57a0ef70330fbdf8f38a33bd88ba94f1115de098319e41af0ae86091a1e610e209fc87a9823f69da5c883b0a2fd7adc203578cc4ab08733' '06481e0492d8ec0f353672fbd1d71322b105849871975f434f87bcb33ca898f85407403ba935153e5d8cca44fea62bfbb43404871d12f26891579067a36fae19' '2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf' '8081673a6594e5fc2fddc98fa434e99817aa822f7136d3c14c8d465fa7b93c9ac5d3a4150a5b632e25b1dc76a814dfa19d8aede37d58b935db288465b6585c58') _kernelname=${pkgbase#} : ${_kernelname:=-Arch-vanilla-selinux-54} prepare() { cd $_origsrcname msg2 "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "$_kernelname" > localversion.20-pkgname local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = *.patch ]] || continue msg2 "Applying patch $src..." patch -Np1 < "../$src" done msg2 "Setting config..." cp ../config .config make olddefconfig make -s kernelrelease > version msg2 "Prepared %s version %s" "$pkgbase" "$( "${startdir}/config.last" } build() { cd $_origsrcname make all make htmldocs } _package() { pkgdesc="The ${pkgbase/linux/Linux} 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') backup=("etc/mkinitcpio.d/$pkgbase.preset") install=$pkgbase.install cd $_origsrcname local kernver="$( "$startdir/$install.pkg" true && install=$install.pkg # fill in mkinitcpio preset and pacman hooks sed "$subst" ../$pkgbase.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" } _package-headers() { pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel" cd $_origsrcname local builddir="$pkgdir/usr/lib/modules/$(