# Maintainer: David P. # Contributor: André Silva # Contributor: Márcio Silva # Contributor: Nicolás Reynolds # Contributor: Sorin-Mihai Vârgolici # Contributor: Michał Masłowski # Contributor: Luke R. # Based on linux-zen package _replacesarchkernel=('linux-zen') _replacesoldkernels=() _replacesoldmodules=() pkgbase=linux-libre-pck pkgver=5.15.13.pck1 pkgrel=1 pkgdesc='Linux-libre PCK' url='https://wiki.parabola.nu/PCK' arch=(i686 x86_64 armv7h) license=(GPL2) makedepends=( bc kmod libelf pahole cpio perl tar xz xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick ) options=('!strip') _srcname=linux-5.15 source=( "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_srcname##*-}-gnu/linux-libre-${_srcname##*-}-gnu.tar.xz"{,.sign} "https://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver%.*}-gnu/patch-${_srcname##*-}-gnu-${pkgver%.*}-gnu.xz"{,.sign} "https://repo.parabola.nu/other/pck/patches/${pkgver%.*}-gnu/patch-${pkgver%.*}-gnu-${pkgver##*.}.patch"{,.sig} config.i686 config.x86_64 config.armv7h # the main kernel config files linux-armv7h.preset # armv7h preset file for mkinitcpio ramdisk ) validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. ) sha512sums=('3c586054285ea0cb4d1a1ff257757d092db80c2413dcec6e58c63b22490d42b8f2c441cee62839603599d5ad75fbd7560bf51ec6c2f3ab9354adae0c2c7234e5' 'SKIP' '5a5bf2db2f274b7b31d2d7dcae5de7299023f8b5ba898512aa39f57663897501a6f6293e287093baa09405a5e28a8218e61fee7b1d553ad5d05940d4d799b3b0' 'SKIP' '1cc2038d835c0031ceed93babc83867b419c2d758f81e903f25565fe4b392427d8f41901be9743be4e7f613b3dcd3ac0343bce75581157f4e74eb565661864b4' 'SKIP' 'eb0305cb2f50bf9f23774677e2111268f934d12f4f0170eb9e5b6c8afd7a732c7c4b9468684dbfa8aaf267ef970350fb0bd0aa08c9fdfc58e0cbbfea0edcd97c' '022815fe38bd9aa75ae08e1b1d92ac4141ea9dfb730ce77c709df658bab910611220dbbae441b1beef2e432f9b79460f5a98b62f4e2d65f0629818b0208a2c40' '6728253ca04a603ef35ceb06b284c509d8ffda6a8c6403fe687afe5d956425588ebbd62bfc5dd1d7fd9a03071a30c7cd86ac72a1fd67cbbf1ebdac85ee703caf' '53103bf55b957b657039510527df0df01279dec59cda115a4d6454e4135025d4546167fa30bdc99107f232561c1e096d8328609ab5a876cf7017176f92ad3e0b') _replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") _replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") _replacesoldmodules=("${_replacesoldmodules[@]/\%/${pkgbase#linux-libre}}") case "$CARCH" in i686|x86_64) KARCH=x86;; armv7h) KARCH=arm;; esac export KBUILD_BUILD_HOST=parabola export KBUILD_BUILD_USER=$pkgbase export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" prepare() { cd $_srcname if [ "${_srcname##*-}" != "${pkgver%.*}" ]; then echo "Applying upstream patch..." patch -Np1 < "../patch-${_srcname##*-}-gnu-${pkgver%.*}-gnu" fi echo "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux-libre}" > localversion.20-pkgname local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = *.patch ]] || continue echo "Applying patch $src..." patch -Np1 < "../$src" done echo "Setting config..." cp ../config.$CARCH .config make olddefconfig diff -u ../config .config || : make -s kernelrelease > version echo "Prepared $pkgbase version $(