summaryrefslogtreecommitdiff
path: root/system/zsh
diff options
context:
space:
mode:
authorDan Theisen <djt@hxx.in>2018-06-23 18:52:26 +0000
committerDan Theisen <djt@hxx.in>2018-06-23 19:02:40 +0000
commit4d991936c0489b5a4e12e5a06de56a68a0e37b97 (patch)
tree2f92a501b2d98d3b4c434f5628223c565b3acf54 /system/zsh
parent8d0e88d6c984d71677b3abc2c83d9d8e288d19e9 (diff)
downloadpackages-4d991936c0489b5a4e12e5a06de56a68a0e37b97.tar.gz
packages-4d991936c0489b5a4e12e5a06de56a68a0e37b97.tar.bz2
packages-4d991936c0489b5a4e12e5a06de56a68a0e37b97.tar.xz
packages-4d991936c0489b5a4e12e5a06de56a68a0e37b97.zip
system/zsh: [PD] bump, fix maintainer, clean up
Diffstat (limited to 'system/zsh')
-rw-r--r--system/zsh/APKBUILD46
-rw-r--r--system/zsh/zshrc32
2 files changed, 65 insertions, 13 deletions
diff --git a/system/zsh/APKBUILD b/system/zsh/APKBUILD
index 3672a0445..7ecfe6b69 100644
--- a/system/zsh/APKBUILD
+++ b/system/zsh/APKBUILD
@@ -1,23 +1,33 @@
# Contributor: <kalonji@gmail.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=zsh
-pkgver=5.4.1
-pkgrel=1
+pkgver=5.5.1
+pkgrel=0
pkgdesc="A very advanced and programmable command interpreter (shell)"
url="http://www.zsh.org/"
arch="all"
-license="BSD"
+license="Zsh AND BSD-3-Clause AND GPL-2.0+ AND GPL-2.0-only AND Artistic-1.0-Perl AND MIT AND GPL-1.0+"
depends="debianutils" # add-shell
makedepends_host="ncurses-dev pcre-dev"
install="zsh.post-install zsh.post-upgrade zsh.pre-deinstall"
source="http://www.zsh.org/pub/$pkgname-$pkgver.tar.gz
zprofile
+ zshrc
"
-subpackages="$pkgname-doc $pkgname-calendar::noarch $pkgname-vcs::noarch"
+subpackages="$pkgname-doc
+ $pkgname-calendar::noarch
+ $pkgname-vcs::noarch
+ $pkgname-tcp::noarch"
[ "$CBUILD" != "$CHOST" ] || subpackages="$subpackages $pkgname-zftp"
builddir="$srcdir/$pkgname-$pkgver"
+# secfixes:
+# 5.4.1-r1:
+# - CVE-2018-1083
+# - CVE-2018-1100
+
_libdir="usr/lib/zsh/$pkgver"
_sharedir="usr/share/zsh/$pkgver"
@@ -54,7 +64,7 @@ prepare() {
cd Unix/Command
rm -f _aap _apm _baz _bittorrent _bpython _ccal _cdcd _chkconfig _clay \
_cowsay _cplay _cssh _darcs _devtodo _dict _dsh _elfdump _elm \
- _enscript _finger _flasher _fsh _gnupod _guilt _initctl _lzop \
+ _enscript _finger _flasher _fsh _gnupod _guilt _initctl \
_mencal _module _monotone _moosic _mysqldiff _nkf \
_pack _perforce _pine _pkgadd _pkginfo _pkgrm _prcs \
_quilt _raggle _rcs _rlogin _rubber _sablotron _sisu _socket \
@@ -76,15 +86,16 @@ build() {
--host=$CHOST \
--prefix=/usr \
--bindir=/bin \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --sysconfdir=/etc \
--enable-etcdir=/etc/zsh \
- --enable-multibyte \
--enable-pcre \
+ --enable-unicode9 \
+ --enable-multibyte \
--enable-function-subdirs \
--enable-zsh-secure-free \
- --sysconfdir=/etc \
- --with-tcsetpgrp \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info
+ --with-tcsetpgrp
make
}
@@ -106,6 +117,7 @@ package() {
make DESTDIR="$pkgdir" install
install -Dm644 "$srcdir"/zprofile "$pkgdir"/etc/zsh/zprofile
+ install -Dm644 "$srcdir"/zshrc "$pkgdir"/etc/zsh/zshrc
}
doc() {
@@ -127,6 +139,13 @@ vcs() {
_submv $_sharedir/functions/VCS_Info
}
+tcp() {
+ pkgdesc="Network I/O over TCP/IP from within the shell"
+ depends="$pkgname"
+
+ _submv $_sharedir/functions/TCP
+}
+
zftp() {
pkgdesc="Zftp Function System for ZSH"
depends="$pkgname"
@@ -156,5 +175,6 @@ _submv() {
mv "$pkgdir"/$path "$subpkgdir"/${path%/*}/
}
-sha512sums="56a83b4a8ae97656ea5a2d7b15632a288017552c276ab306be6d242d83dc92ce871330aeb46a0e8a49e9f30f6bff32e3c956c62e5ce19361e52ea0799cb59f50 zsh-5.4.1.tar.gz
-cbc184f0c4af1441eaad2a3f7255be9941c64bd5a05977aea5ca3a0a11a3d121c34c1fc9e633465eda087cd196dabf9591082117bbb42cc6e6bc9352ec2c207d zprofile"
+sha512sums="c4f7327a3f5480bd9a169fb07e34812e0106fa9de3b5f7d38bb0db85a3e4d01b9a4a8f35553da03a15d7d819108305cfaa2811c945273e2cac84512219e69ebb zsh-5.5.1.tar.gz
+cbc184f0c4af1441eaad2a3f7255be9941c64bd5a05977aea5ca3a0a11a3d121c34c1fc9e633465eda087cd196dabf9591082117bbb42cc6e6bc9352ec2c207d zprofile
+cd3a8a6ada8f1ce97a6ca7af5a615092339cde00c20c657d7ce7bf4da57f7a774f2eb5c7d17bdf7e1a12e8b5d0d7878c977d87a0b068c2a869b91cec9ef8d69d zshrc"
diff --git a/system/zsh/zshrc b/system/zsh/zshrc
new file mode 100644
index 000000000..11546c289
--- /dev/null
+++ b/system/zsh/zshrc
@@ -0,0 +1,32 @@
+# enable emacs input mode by default
+bindkey -e
+
+# set standard PS1
+do_colour() {
+ local colourise=false
+
+ LS_COLORS=
+ eval "$(dircolors -b)"
+ if [[ -n ${LS_COLORS:+set} ]]; then
+ colourise=true
+ else
+ unset LS_COLORS
+ fi
+
+ if ${colourise} ; then
+ if [[ ${EUID} == 0 ]] ; then
+ PS1='%B%F{white}%m%f%b %B%F{cyan}%~%f%b %B%F{red}%#%f%b '
+ else
+ PS1='%n on %B%F{white}%m%f%b %~ %B%F{green}%#%f%b '
+ fi
+ else
+ if [[ ${EUID} == 0 ]] ; then
+ # show root@ when we don't have colors
+ PS1='! %n on %m %~ %# '
+ else
+ PS1='%n on %m %~ %# '
+ fi
+ fi
+}
+
+do_colour