# Maintainer: NobodyDBG pkgbase=linux-vanilla-selinux-testing pkgname=linux-vanilla-selinux-testing pkgver=5.11rc3 _pkgverdown=5.10 _pkgreldown=rc7 pkgrel=1 pkgdesc="Vanilla-Linux-Kernel (Mainline-Kernel) 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-testing _origsrcname=linux-${_pkgverdown}-${_pkgreldown} source=(https://git.kernel.org/torvalds/t/${_origsrcname}.tar.gz 'config' # the main kernel config file 'linux-vanilla-selinux-testing.install' # Installfile '60-linux.hook' # pacman hook for depmod '90-linux.hook' # pacman hook for initramfs regeneration 'linux-vanilla-selinux-testing.preset' # standard config files for mkinitcpio ramdisk ) 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=('5f723eb77901db1de7f9a34ccce1dd1120be605751cc2139d10d2d8bd1536fa0ac9dc3fb4587f8076fe351cab2ba8f99a545ff18f0c1b8e953001644391f1758' 'a48af1bde9cfe8d3fbfedb84a13f26548c11e55eeb551159faeedaf6b63cd265fdff8a0c3d150f0a7b133a4e3f09075211496ce19451309ed5f94cf2026219bb' 'fc52feda32be644deeadf267fdff124ffcc0d0870c36e736024a7be0958ba4b50cea5ef0ec33c2681ad00f36b42ebed354fa3e63bd4827acbeedebc39029229c' '7132a74149b39e30f57a0ef70330fbdf8f38a33bd88ba94f1115de098319e41af0ae86091a1e610e209fc87a9823f69da5c883b0a2fd7adc203578cc4ab08733' '06481e0492d8ec0f353672fbd1d71322b105849871975f434f87bcb33ca898f85407403ba935153e5d8cca44fea62bfbb43404871d12f26891579067a36fae19' '2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf') _kernelname=${pkgbase#} : ${_kernelname:=-Arch-vanilla-selinux-testing} 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/$(