new pkg: zsh-5.9

This commit is contained in:
Yingjie Wang 2024-06-05 20:36:20 -04:00
parent 75e6cfaa09
commit 11b7efd9a6

42
shells/zsh-5.9.PKGBUILD Normal file
View File

@ -0,0 +1,42 @@
pkgname="zsh"
pkgver="5.9"
pkgdesc="A very advanced and programmable command interpreter (shell) for UNIX"
homepage="https://www.zsh.org/"
license=("custom")
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://www.zsh.org/pub/zsh-5.9.tar.xz")
md5sums=("182e37ca3fe3fa6a44f69ad462c5c30e")
src_prepare() {
tar -xf ${DIST_DIR}/${pkgname}-${pkgver}/${sources[0]} --strip-components=1
sed -e 's/set_from_init_file/texinfo_&/' -i Doc/Makefile.in
sed 's|/etc/z|/etc/zsh/z|g' -i Doc/*.*
}
src_build() {
./configure --prefix=/usr \
--sysconfdir=/etc/zsh \
--enable-etcdir=/etc/zsh \
--enable-cap \
--enable-gdbm \
--with-term-lib='ncursesw' \
--enable-multibyte &&
make &&
makeinfo Doc/zsh.texi --html -o Doc/html&&
makeinfo Doc/zsh.texi --plaintext -o zsh.txt &&
makeinfo Doc/zsh.texi --html --no-split --no-headers -o zsh.html
}
src_check(){
HOME="${srcdir}" make check
}
src_install(){
make DESTDIR="${pkgdir}/" install &&
install -D -m644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" &&
make DESTDIR="${pkgdir}/" infodir="/usr/share/info" install.info &&
make DESTDIR="${pkgdir}/" htmldir="/usr/share/doc/zsh-5.9/html" install.html &&
install -v -m644 zsh.{html,txt} Etc/FAQ "${pkgdir}/usr/share/doc/zsh-5.9"
}