# 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 Shumaker # Contributor: Luke R. # Based on linux-zen package _replacesarchkernel=('linux-zen') _replacesoldkernels=() _replacesoldmodules=() pkgbase=linux-libre-pck pkgver=5.4.2.pck1 pkgrel=1 pkgdesc='Linux-libre PCK' url='https://wiki.parabola.nu/PCK' arch=(i686 x86_64 armv7h) license=(GPL2) makedepends=( bc kmod libelf xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick ) options=('!strip') _srcname=linux-5.4 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 "revert.diff::https://github.com/zen-kernel/zen-kernel/commit/92f669d8f5542fe3981115706a7b9066a0903b4a.patch" ) validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. ) sha512sums=('0d0915133864eb031adfc6700066147dcf3e768a50a31c39754950c95ef4fd322dc701cd50af49c403ef0325adfcb07e354d5e46c1be3dcdd719a7a55c963f37' 'SKIP' '0b177b5ab5e7b65769c7b1176590f9fadd134f32af4db2bd0fa362dccfefb28d7fd0865b46418f54f10f039623d86012b49bcfb968bae77274447d7a97da35f5' 'SKIP' '7f935c09c0d46ac1925dba45616962d4e73cad4eeaef4af3565915eeafbe853afd90faae9f6cd567b7a71b910512d43da0649d578a01e2d740cc7b1eb1a4e192' 'SKIP' 'ffaee50ee6400dd664e2486504e491e6a023b97a4234faea96c98013cb8fd3a813aca5cc97c5f909180acc22137bb51fd083c9f66a3e08a1e1b62d1b752f6ae4' 'e72735acf8502219a6f420ce3fab7cfba76c7460d46cf390366b39988bb45cddc4aa9b65257b4f6fae8b59f7f1f1d4bdc877246fa20c4e43bdd44f5f85d027c5' '82c1f245ce87d41f85e249c6be36f66b5949a803604af1502bb6d74ab059e636f15ffd1365564f91bc6d539f8afdf3558fe6dcb03459f8d47174ba2ead825ed2' 'f01e7925b262d2874a8a991b1f27d057356a2a384d2012b61be5a631d4e4d7cf87461c8fb9e7f183831f5a829ad204897f1f0545a52df6288a0e04a5c2e31b96' '09de09b3333f631d2ecfd8c2bc8798dde3d88eb822f4032fa3152c8498588236f38ad29ba118dc29309a7b3783fb6c89dd3f4daa78ee6d1b24437076fcf479f2') _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 msg2 "Applying upstream patch..." patch -Np1 -i ../patch-${_srcname##*-}-gnu-${pkgver%.*}-gnu fi msg2 "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 msg2 "Applying patch $src..." patch -Np1 < "../$src" done if [ "$CARCH" = "armv7h" ]; then # this breaks the build in GCC 8.3.0 patch -NRp1 -i ../revert.diff fi msg2 "Setting config..." cp ../config.$CARCH .config make olddefconfig make -s kernelrelease > version msg2 "Prepared %s version %s" "$pkgbase" "$(