jobcore/less/PKGBUILD
2024-04-13 14:36:05 +03:00

61 lines
1.9 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=less
pkgver=643
pkgrel=02
epoch=1
pkgdesc='A terminal based program for viewing text files'
url='https://www.greenwoodsoftware.com/less/'
depends=('glibc' 'ncurses' 'pcre2')
source=("https://www.greenwoodsoftware.com/$pkgname/$pkgname-$pkgver.tar.gz"
"$pkgname-$pkgver.tar.gz.sig::https://www.greenwoodsoftware.com/$pkgname/$pkgname-$pkgver.sig"
"backport-007521ac3c95bc76.patch")
prepare() {
cd $pkgname-$pkgver
# patch -Np1 < ../less-CVE-2022-46663.patch
# apply patch from the source array (should be a pacman feature)
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
# https://www.openwall.com/lists/oss-security/2024/04/12/5
# https://github.com/gwsw/less/commit/007521ac3c95bc76.patch
# backport by tpowa@archlinux.org for less-643
patch -Np1 < "../$src"
done
}
build() {
cd $pkgname-$pkgver
sh configure --prefix=/usr --sysconfdir=/etc --with-regex=pcre2
make
}
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('GPL-3.0-or-later')
validpgpkeys=('AE27252BD6846E7D6EAE1DD6F153A7C833235259') # Mark Nudelman
sha256sums=(2911b5432c836fa084c8a2e68f6cd6312372c026a58faaa98862731c8b6052e8 # less-643.tar.gz
2aec0393a32dacd44cbd8a57ad21d842739f3262c6e02fa2d28abd105ea5e5cf # less-643.tar.gz.sig
2fb1552faecfd9956966819e19ef699a20370596f4f04370ac19fee60e1bd412) # backport-007521ac3c95bc76.patch
## bc4589582175e9719c8d9bd5689b94152c445f2c52bc4b16ef5cc864eca81c74 less-1:643-02-x86_64.pkg.tar.lz