MSYS2-packages/zsh/PKGBUILD
Christoph Reiter d587d7b5e0 more CPEs
2024-03-25 11:19:53 +01:00

106 lines
3.7 KiB
Bash

# Maintainer: Alexey Pavlov <alexpux@gmail.com>
pkgbase=zsh
pkgname=('zsh' 'zsh-doc')
pkgver=5.9
pkgrel=2
arch=('i686' 'x86_64')
url='https://www.zsh.org/'
msys2_references=(
"cpe: cpe:/a:zsh_project:zsh"
"cpe: cpe:/a:zsh:zsh"
)
license=('custom')
makedepends=('ncurses-devel' 'pcre-devel' 'libiconv-devel' 'libgdbm-devel' 'autotools' 'gcc' 'groff')
source=("https://www.zsh.org/pub/zsh-${pkgver}.tar.xz"{,.asc}
"https://www.zsh.org/pub/zsh-${pkgver}-doc.tar.xz"{,.asc}
'zprofile'
'zshenv'
Makefile.in.patch
add-pwd-W-option.patch
msysize.patch
zsh-5.0.6-1.patch
msys-symlink-hack.patch)
sha256sums=('9b8d1ecedd5b5e81fbf1918e876752a7dd948e05c1a0dba10ab863842d45acd5'
'SKIP'
'6f7c091249575e68c177c5e8d5c3e9705660d0d3ca1647aea365fd00a0bd3e8a'
'SKIP'
'230832038c3b8f67fdb1b284ac5f68d709cdb7f1bc752b0e60657b9b9d091045'
'06c05faa800cb7385b606fd2b3c9aa24cfac07d1dde7f0d2f017c11ede9b2ac8'
'971e48433ec40e0c2fb64584b5555367b4f997156aa9acbd06c67d7bdacd6c59'
'b3f74a10a27eff498124adc96bc8c5cced7bb15e18c2603d7c3490a81e3c2e48'
'b879d33cc60fc0c44361189eef1ee95a3bd0b8f9e8b32c81e439950483c151aa'
'336a8e6e93b778e7aec27348619b7200e0a75e5cf14dce720afd9dd6f836ea2c'
'de515b0d86c13c29a663b4ba0fdb338dea83f82f145cf8c4da78d30369f963e4')
validpgpkeys=('F7B2754C7DE2830914661F0EA71D9A9D4BDB27B3'
'E96646BE08C0AF0AA0F90788A5FEEE3AC7937444'
'7CA7ECAAF06216B90F894146ACF8146CAE8CBBC4') # dana <dana@dana.is>
prepare() {
cd ${srcdir}/${pkgname}-${pkgver}
patch -p0 -i "${srcdir}/Makefile.in.patch"
patch -p1 -i "${srcdir}/add-pwd-W-option.patch"
patch -p1 -i "${srcdir}/msysize.patch"
patch -p1 -i "${srcdir}/zsh-5.0.6-1.patch"
patch -p1 -i "${srcdir}/msys-symlink-hack.patch"
autoreconf -fiv
# Set correct keymap path
sed -i 's#/usr/share/keymaps#/usr/share/kbd/keymaps#g' Completion/Unix/Command/_loadkeys
# 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 -f Completion/Linux/Command/_{pkgtool,rpmbuild,yast}
rm -f Completion/Unix/Command/_{osc,systemd}
}
build() {
cd ${srcdir}/${pkgname}-${pkgver}
./configure --prefix=/usr \
--build=${CHOST} \
--host=${CHOST} \
--docdir=/usr/share/doc/zsh \
--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 \
--disable-cap \
--enable-zsh-secure-free
make
}
package_zsh() {
pkgdesc='A very advanced and programmable command interpreter (shell) for UNIX'
depends=('ncurses' 'pcre' 'libiconv' 'gdbm')
backup=('etc/zsh/zprofile' 'etc/zsh/zshenv')
install=zsh.install
cd "${srcdir}/${pkgbase}-${pkgver}"
make DESTDIR="${pkgdir}" install
install -D -m644 "${srcdir}/zprofile" "${pkgdir}/etc/zsh/zprofile"
install -D -m644 "${srcdir}/zshenv" "${pkgdir}/etc/zsh/zshenv"
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 -D -m644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}