diff options
Diffstat (limited to 'libre/linux-libre-hardened')
-rw-r--r-- | libre/linux-libre-hardened/PKGBUILD | 47 |
1 files changed, 19 insertions, 28 deletions
diff --git a/libre/linux-libre-hardened/PKGBUILD b/libre/linux-libre-hardened/PKGBUILD index 6dca19e65..d06b0dfa6 100644 --- a/libre/linux-libre-hardened/PKGBUILD +++ b/libre/linux-libre-hardened/PKGBUILD @@ -9,22 +9,22 @@ _replacesoldkernels=('linux-grsec' 'linux-libre-grsec') # '%' gets replaced with _replacesoldmodules=() # '%' gets replaced with kernel suffix pkgbase=linux-libre-hardened -pkgver=5.3.13.a_gnu +pkgver=5.3.15.a pkgrel=1 pkgdesc='Security-Hardened Linux-libre' url='https://linux-libre.fsfla.org/' arch=(x86_64) license=(GPL2) makedepends=( - xmlto kmod inetutils bc libelf - python-sphinx python-sphinx_rtd_theme graphviz imagemagick + bc kmod libelf + xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick ) options=('!strip') _srcname=linux-5.3 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//${pkgver%.*}.*_/${pkgver%.*}-}/patch-${_srcname##*-}-gnu-${pkgver//${pkgver%.*}.*_/${pkgver%.*}-}.xz"{,.sign} - "https://github.com/anthraxx/linux-hardened/releases/download/${pkgver%%_*}/linux-hardened-${pkgver%%_*}.patch"{,.sig} + "https://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver%.*}-gnu/patch-${_srcname##*-}-gnu-${pkgver%.*}-gnu.xz"{,.sign} + "https://github.com/anthraxx/linux-hardened/releases/download/$pkgver/linux-hardened-$pkgver.patch"{,.sig} "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}{,.sig} config # the main kernel config file @@ -44,9 +44,9 @@ validpgpkeys=( ) sha512sums=('85d83c973ef96ab414354414da70ab3e1c3df19c3088458498cec1594952878b7967a8988bd9e36d4e728cc573a36e6eac056dbcab2f9aa742f18cbb4fb3164f' 'SKIP' - '3e9c95825f6852a0721a940c80b01b9772c17ae1680c1ce5a151e4f5b577a4a50f030aa0f2fbbc2b53b898b081bf33e67bfdeb513fe5535f95c4b479452264c3' + '53ad8cc46fcc54d4504a8711e8bce06d862e285499435a31afe9097cf907948688aa409e0918dac443988d72b6a8dae2fd4d87d1b6ce87a0a3f6f64e589fcd36' 'SKIP' - '4df1d7be2823df714f9a1f5480ff2d5476929c58910fc4a6b1af3e4d325a4519072850dc0dc218ec402b17aa7456bc1596f95409f2f92717dc7cac07cb42b0b6' + '78604abfd436c2b46ca23048bbfbcbf4e788bcf0001c88a92a0967c48c612c7a367996ace05b5e9741dba091a8b22a663ce5092296ed6687019150b93e2cd8be' 'SKIP' '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' 'SKIP' @@ -69,18 +69,17 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP prepare() { cd $_srcname - if [ "${_srcname##*-}-gnu" != "${pkgver//${pkgver%.*}.*_/${pkgver%.*}-}" ]; then + if [ "${_srcname##*-}" != "${pkgver%.*}" ]; then msg2 "Applying upstream patch..." - patch -p1 -i ../patch-${_srcname##*-}-gnu-${pkgver//${pkgver%.*}.*_/${pkgver%.*}-} + patch -Np1 -i ../patch-${_srcname##*-}-gnu-${pkgver%.*}-gnu fi - + msg2 "Adding freedo as boot logo..." install -m644 -t drivers/video/logo \ ../logo_linux_{clut224.ppm,vga16.ppm,mono.pbm} msg2 "Setting version..." - local extraver="${pkgver//_/-}" - sed -e "/^EXTRAVERSION = -gnu/s/= -gnu.*/= .${extraver##*.}/" -i Makefile + sed -e "/^EXTRAVERSION = -gnu/s/= -gnu.*/= .${pkgver##*.}-gnu/" -i Makefile scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux-libre}" > localversion.20-pkgname @@ -113,7 +112,7 @@ _package() { optdepends=('crda: to set the correct wireless channels of your country' 'linux-libre-firmware: firmware images needed for some devices' 'usbctl: deny_new_usb control') - provides=("${_replacesarchkernel[@]/%/=${pkgver%%_*}}" "LINUX-ABI_VERSION=${pkgver%.*}") + provides=("${_replacesarchkernel[@]/%/=${pkgver%.*}}" "LINUX-ABI_VERSION=${pkgver%.*}") conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") @@ -141,7 +140,7 @@ _package() { _package-headers() { pkgdesc="Header files and scripts for building modules for $pkgdesc kernel" - provides=("${_replacesarchkernel[@]/%/-headers=${pkgver%%_*}}") + provides=("${_replacesarchkernel[@]/%/-headers=${pkgver%.*}}") conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") @@ -221,8 +220,8 @@ _package-headers() { } _package-docs() { - pkgdesc="Kernel hacker's manual for the $pkgdesc kernel" - provides=("${_replacesarchkernel[@]/%/-docs=${pkgver%%_*}}") + pkgdesc="Documentation for the $pkgdesc kernel" + provides=("${_replacesarchkernel[@]/%/-docs=${pkgver%.*}}") conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}") replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}") @@ -230,20 +229,12 @@ _package-docs() { local builddir="$pkgdir/usr/lib/modules/$(<version)/build" msg2 "Installing documentation..." - mkdir -p "$builddir" - cp -t "$builddir" -a Documentation - - msg2 "Removing unneeded files..." - rm -rv "$builddir"/Documentation/{,output/}.[^.]* - - msg2 "Moving HTML docs..." local src dst while read -rd '' src; do - dst="$builddir/Documentation/${src#$builddir/Documentation/output/}" - mkdir -p "${dst%/*}" - mv "$src" "$dst" - rmdir -p --ignore-fail-on-non-empty "${src%/*}" - done < <(find "$builddir/Documentation/output" -type f -print0) + dst="${src#Documentation/}" + dst="$builddir/Documentation/${dst#output/}" + install -Dm644 "$src" "$dst" + done < <(find Documentation -name '.*' -prune -o ! -type d -print0) msg2 "Adding symlink..." mkdir -p "$pkgdir/usr/share/doc" |