jobcore/zsh/PKGBUILD

102 lines
3.2 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')
pkgver=5.8.1
pkgrel=02
arch=('x86_64')
url='https://www.zsh.org/'
makedepends=(pcre libcap gdbm yodl)
source=("https://www.zsh.org/pub/zsh-${pkgver}"{,-doc}".tar.xz"{,.asc}
'zprofile')
prepare() {
cd "${srcdir}/${pkgbase}-${pkgver}"
# 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-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"
}
#---- license gpg-key sha256sums ----
license=('custom')
validpgpkeys=('F7B2754C7DE2830914661F0EA71D9A9D4BDB27B3'
'E96646BE08C0AF0AA0F90788A5FEEE3AC7937444'
'7CA7ECAAF06216B90F894146ACF8146CAE8CBBC4')
sha256sums=(b6973520bace600b4779200269b1e5d79e5f505ac4952058c11ad5bbf0dd9919 # zsh-5.8.1.tar.xz
2ab4308151f87733eafcd09c88974508156136c94d1c56a0ee7b3f649c994ec6 # zsh-5.8.1.tar.xz.asc
8b9cb53d6432f13e9767a8680b642e8e8a52c7f1b8decd211756ca20c667f917 # zsh-5.8.1-doc.tar.xz
2d0f2895c28fb9b4bb131b3b387ee50ee383ee27b20204231409b900cd7670ce # zsh-5.8.1-doc.tar.xz.asc
230832038c3b8f67fdb1b284ac5f68d709cdb7f1bc752b0e60657b9b9d091045) # zprofile