jobcore/zsh/PKGBUILD
2023-08-16 16:43:07 +03:00

118 lines
3.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 |---------------------------------------
#pkgbase=zsh
#pkgname=('zsh' 'zsh-doc')
pkgname=zsh
pkgver=5.9
pkgrel=05
url='https://www.zsh.org/'
makedepends=(pcre libcap gdbm yodl)
source=("https://www.zsh.org/pub/zsh-${pkgver}"{,-doc}".tar.xz"{,.asc}
'0001-50629-do-not-use-egrep-in-tests.patch'
'fix-autocompletion.patch'
'zprofile')
prepare() {
cd "${srcdir}/${pkgbase}-${pkgver}"
# 50629: do not use egrep in tests
patch -Np1 < ../0001-50629-do-not-use-egrep-in-tests.patch
# https://github.com/zsh-users/zsh/commit/3e3cfabcc74dc79d4d8717c4e5859d8d01be6c54
# https://www.zsh.org/mla/workers/2022/msg00652.html
patch -Np1 < ../fix-autocompletion.patch
# Set correct keymap path
sed -i 's#/usr/share/keymaps#/usr/share/kbd/keymaps#g' Completion/Unix/Command/_loadkeys
# Fix usb.ids path
sed -i 's#/usr/share/misc/usb.ids#/usr/share/hwdata/usb.ids#g' Completion/Linux/Command/_lsusb
# Remove unneeded and conflicting completion scripts
for _fpath in AIX BSD Cygwin Darwin Debian Mandriva openSUSE Redhat Solaris; do
rm -rf Completion/$_fpath
sed "s#\s*Completion/$_fpath/\*/\*##g" -i Src/Zle/complete.mdd
done
rm Completion/Linux/Command/_pkgtool
# force generation of documentation with correct paths
rm Doc/version.yo
}
build() {
cd "${srcdir}/${pkgbase}-${pkgver}"
./configure --prefix=/usr \
--docdir=/usr/share/doc/zsh \
--htmldir=/usr/share/doc/zsh/html \
--enable-etcdir=/etc/zsh \
--enable-zshenv=/etc/zsh/zshenv \
--enable-zlogin=/etc/zsh/zlogin \
--enable-zlogout=/etc/zsh/zlogout \
--enable-zprofile=/etc/zsh/zprofile \
--enable-zshrc=/etc/zsh/zshrc \
--enable-maildir-support \
--with-term-lib='ncursesw' \
--enable-multibyte \
--enable-function-subdirs \
--enable-fndir=/usr/share/zsh/functions \
--enable-scriptdir=/usr/share/zsh/scripts \
--with-tcsetpgrp \
--enable-pcre \
--enable-cap \
--enable-gdbm \
--enable-zsh-secure-free
make
}
#check() {
# cd "${srcdir}/${pkgbase}-${pkgver}"
# HOME="${srcdir}" make check
#}
package_zsh() {
pkgdesc='A very advanced and programmable command interpreter (shell) for UNIX'
groups=( jobbot )
depends=('pcre' 'libcap' 'gdbm')
backup=('etc/zsh/zprofile')
install=zsh.install
cd "${srcdir}/${pkgbase}-${pkgver}"
make DESTDIR="${pkgdir}/" install
install -D -m644 "${srcdir}/zprofile" "${pkgdir}/etc/zsh/zprofile"
install -D -m644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
#package_zsh-doc() {
# pkgdesc='Info, HTML and PDF format of the ZSH documentation'
#
# cd "${srcdir}/${pkgbase}-${pkgver}"
# make DESTDIR="${pkgdir}/" install.info install.html
# install -D -m644 Doc/zsh.pdf "${pkgdir}/usr/share/doc/zsh/zsh.pdf"
# install -D -m644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
#}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('custom')
validpgpkeys=('F7B2754C7DE2830914661F0EA71D9A9D4BDB27B3'
'E96646BE08C0AF0AA0F90788A5FEEE3AC7937444'
'7CA7ECAAF06216B90F894146ACF8146CAE8CBBC4')
sha256sums=(9b8d1ecedd5b5e81fbf1918e876752a7dd948e05c1a0dba10ab863842d45acd5 # zsh-5.9.tar.xz
026e0e0bcaf389a60167694eec41fb7840bb4bf196af25b3365ba7eef51e763b # zsh-5.9.tar.xz.asc
6f7c091249575e68c177c5e8d5c3e9705660d0d3ca1647aea365fd00a0bd3e8a # zsh-5.9-doc.tar.xz
2fda22062a9dcbcb5e76a5b4b5a0f7b8d7e4cd08707b05f11d3b99e721a982b5 # zsh-5.9-doc.tar.xz.asc
bcce55ff5a81a321c501b7749a7d3e2031004c0ab999d80c35eeb4b9ce7efdf0 # 0001-50629-do-not-use-egrep-in-tests.patch
e7060f64936bcc94aeaf44e69b6d476917a8c14cd339a3bc779c080fb01bb2f7 # fix-autocompletion.patch
230832038c3b8f67fdb1b284ac5f68d709cdb7f1bc752b0e60657b9b9d091045) # zprofile
## 892f6ddbfc3caafe6515c1991a5d92b624406c6dd3ec11ef55d9bf20348c28da zsh-5.9-05-x86_64.pkg.tar.lz