initial import
This commit is contained in:
144
zsh/PKGBUILD
Normal file
144
zsh/PKGBUILD
Normal file
@@ -0,0 +1,144 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgbase=zsh
|
||||
pkgname=($pkgbase $pkgbase-kshcompat $pkgbase-shcompat $pkgbase-doc)
|
||||
pkgver=5.8
|
||||
pkgrel=2
|
||||
_debver=5.8
|
||||
_debrel=6
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://www.zsh.org/'
|
||||
license=('custom:Zsh')
|
||||
makedepends=('pcre' 'libcap' 'gdbm' 'quilt')
|
||||
source=("https://www.zsh.org/pub/zsh-${pkgver}"{,-doc}".tar.xz"{,.asc}
|
||||
"https://deb.debian.org/debian/pool/main/z/zsh/zsh_$_debver-$_debrel.debian.tar.xz"
|
||||
'zprofile')
|
||||
sha512sums=('96198ecef498b7d7945fecebbe6bf14065fa8c5d81a7662164579eba8206b79575812d292adea1864bc7487ac0818ba900e25f9ab3802449340de80417c2c533'
|
||||
'SKIP'
|
||||
'38cc549818eb9c6952051b714dd2008d99605aba4ca4f614e62b033c9b067dd2031fff766ac5c1efe5bb52eae32bd482dea5df2b2d46decb7ecdb458f3da9d52'
|
||||
'SKIP'
|
||||
'3e725300578af01624d4751c5ff10e1a7bd81224318984b70851c64b4d65a96c3548c15c2059bad837f1b2fa8c5b450efbebf80deaa6e1ef59bc4056aae00925'
|
||||
'b287e00d8de4dc4cfb1c52bb2aef1d4b191de3512baad4c91dc81e78ddc3e5bb07297f43924b022ac44ff401a348d8a9fa366e19ddc8ea1ea72df311f5ed0034')
|
||||
validpgpkeys=('F7B2754C7DE2830914661F0EA71D9A9D4BDB27B3'
|
||||
'E96646BE08C0AF0AA0F90788A5FEEE3AC7937444'
|
||||
'7CA7ECAAF06216B90F894146ACF8146CAE8CBBC4')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgbase}-${pkgver}"
|
||||
|
||||
if [ ${pkgver%.*} = ${_debver%.*} ]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
# Doesn't apply and seems unimportant
|
||||
rm -v debian/patches/remove-SH_USE_BSD_ECHO-autoconf-test-to-make-build-more-reproducible.patch || true
|
||||
rm -v debian/patches/update_bts_completion.patch || true
|
||||
rm -v debian/patches/update-debian-sections.patch || true
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
|
||||
# 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/_{networkmanager,pkgtool,qdbus}
|
||||
rm Completion/Unix/Command/_{ant,dbus,java,npm}
|
||||
rm Completion/X/Command/_{acroread,netscape}
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgbase}-${pkgver}"
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--bindir=/bin \
|
||||
--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 V=1
|
||||
}
|
||||
|
||||
package_zsh() {
|
||||
pkgdesc='A very advanced and programmable command interpreter (shell) for UNIX'
|
||||
depends=('pcre' 'libcap' 'gdbm')
|
||||
backup=('etc/zsh/zprofile')
|
||||
install=zsh.install
|
||||
|
||||
cd "${srcdir}/${pkgbase}-${pkgver}"
|
||||
make DESTDIR="${pkgdir}/" install
|
||||
install -D -m 644 "${srcdir}/zprofile" -t "${pkgdir}/etc/zsh"
|
||||
|
||||
install -D -m 644 LICENCE -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
}
|
||||
|
||||
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 -m 644 Doc/zsh.pdf -t "${pkgdir}/usr/share/doc/${pkgbase}/"
|
||||
|
||||
install -D -m 644 LICENCE -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
}
|
||||
|
||||
package_zsh-kshcompat() {
|
||||
pkgdesc='Korn Shell compatibility for Zshell'
|
||||
depends=($pkgbase)
|
||||
provides=(ksh)
|
||||
conflicts=(ksh)
|
||||
install=$pkgname.install
|
||||
|
||||
cd "${srcdir}/${pkgbase}-${pkgver}"
|
||||
|
||||
install -d -m 755 $pkgdir/{bin,usr/share/man/man1}
|
||||
ln -s zsh $pkgdir/bin/ksh
|
||||
ln -s zsh $pkgdir/bin/rksh
|
||||
ln -s zsh.1.gz $pkgdir/usr/share/man/man1/ksh.1.gz
|
||||
ln -s zsh.1.gz $pkgdir/usr/share/man/man1/rksh.1.gz
|
||||
|
||||
install -D -m 644 LICENCE -t $pkgdir/usr/share/licenses/$pkgname
|
||||
}
|
||||
|
||||
package_zsh-shcompat() {
|
||||
pkgdesc='POSIX Shell compatibility for Zshell'
|
||||
depends=($pkgbase)
|
||||
provides=(sh)
|
||||
conflicts=(sh)
|
||||
install=$pkgname.install
|
||||
|
||||
cd "${srcdir}/${pkgbase}-${pkgver}"
|
||||
|
||||
install -d -m 755 $pkgdir/{bin,usr/share/man/man1}
|
||||
ln -s zsh $pkgdir/bin/sh
|
||||
ln -s zsh $pkgdir/bin/rsh
|
||||
ln -s zsh.1.gz $pkgdir/usr/share/man/man1/sh.1.gz
|
||||
ln -s zsh.1.gz $pkgdir/usr/share/man/man1/rsh.1.gz
|
||||
|
||||
install -D -m 644 LICENCE -t $pkgdir/usr/share/licenses/$pkgname
|
||||
}
|
||||
Reference in New Issue
Block a user