# Maintainer: NobodyDBG pkgbase=linux-vanilla-selinux-59 pkgname=linux-vanilla-selinux-59 pkgver=5.9.16 pkgrel=2 pkgdesc="Vanilla-Linux-Kernel from kernel.org with Selinux enabled" arch=('x86_64') url="https://www.kernel.org/" license=('GPL2') makedepends=(bc kmod libelf pahole cpio perl tar xz xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick git) options=('!strip') _srcname=linux-vailla-selinux${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-59.install' # Installfile '60-linux.hook' # pacman hook for depmod '90-linux.hook' # pacman hook for initramfs regeneration 'linux-vanilla-selinux-59.preset' # standard config files for mkinitcpio ramdisk 'sphinx-workaround.patch' # Patch for creating 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=('6b810157564a4c78b2bc615eabd6297922a930d118b9288d1f95860407817bb6b420e21faaef98a4b97045723c31daad67190a954e88e58720c689356e2121b9' '78b81f0cef9a6f79268365b97a18c3ee3dd0ac60d7e4a9e8a76a8be2bb55db274c464d33edaa42af60e5488a24a7eebb77cbcf4bc445b0eaa28ad418d6705ee0' '330313a835769d6fcba2462b2925e7ade7be2aadf858c0ebf9d86f13089ee73de5d1db7b0c86a5cb8adc01077991a0ef2651bae88f232dca75f5fbb7b7967837' 'fc52feda32be644deeadf267fdff124ffcc0d0870c36e736024a7be0958ba4b50cea5ef0ec33c2681ad00f36b42ebed354fa3e63bd4827acbeedebc39029229c' '7132a74149b39e30f57a0ef70330fbdf8f38a33bd88ba94f1115de098319e41af0ae86091a1e610e209fc87a9823f69da5c883b0a2fd7adc203578cc4ab08733' '06481e0492d8ec0f353672fbd1d71322b105849871975f434f87bcb33ca898f85407403ba935153e5d8cca44fea62bfbb43404871d12f26891579067a36fae19' '2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf' 'e0afce0ee6210144b63b4519393913b8a1648e673deb708b46b915a53c010a98d747ce07fbdf3eba6c83a590c80cf78199f73bb346a7619c02841a4c7ac5201e') _kernelname=${pkgbase#} : ${_kernelname:=-Arch-vanilla-selinux-59} 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/$(