summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-10-28 13:28:37 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-10-28 13:34:10 +0000
commitdf455ba2f5cd552ecee941ed11d8b468753f43a0 (patch)
tree11a81d573d2739b7e8be7731f162d2ba19ad6b7d
parente5988c7ba4800eae283cfe84642e62b613d23a24 (diff)
downloadaports-df455ba2f5cd552ecee941ed11d8b468753f43a0.tar.bz2
aports-df455ba2f5cd552ecee941ed11d8b468753f43a0.tar.xz
main/zsh: ship a separate zprofile for zsh
fixes #2289
-rw-r--r--main/zsh/APKBUILD17
-rw-r--r--main/zsh/zprofile22
2 files changed, 32 insertions, 7 deletions
diff --git a/main/zsh/APKBUILD b/main/zsh/APKBUILD
index 981309154..383270cb1 100644
--- a/main/zsh/APKBUILD
+++ b/main/zsh/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=zsh
pkgver=5.0.2
-pkgrel=0
+pkgrel=1
pkgdesc="A very advanced and programmable command interpreter (shell) for UNIX"
url="http://www.zsh.org/"
arch="all"
@@ -11,7 +11,8 @@ depends=
makedepends=ncurses-dev
install="zsh.post-install zsh.post-upgrade zsh.pre-deinstall"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
-$install"
+ zprofile"
+subpackages="$pkgname-doc"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
@@ -30,7 +31,6 @@ build() {
--enable-zshenv=/etc/zsh/zshenv \
--enable-zlogin=/etc/zsh/zlogin \
--enable-zlogout=/etc/zsh/zlogout \
- --enable-zprofile=/etc/profile \
--enable-zshrc=/etc/zsh/zshrc \
--enable-multibyte \
--enable-function-subdirs \
@@ -45,10 +45,13 @@ build() {
package() {
cd "$_builddir"
- make DESTDIR="$pkgdir" install
+ make DESTDIR="$pkgdir" install || return 1
+ install -Dm644 "$srcdir"/zprofile "$pkgdir"/etc/zprofile
}
md5sums="b8f2ad691acf58b3252225746480dcad zsh-5.0.2.tar.bz2
-aedff0460ef282937905223207ac702e zsh.post-install
-aedff0460ef282937905223207ac702e zsh.post-upgrade
-b48f79e2d4a29047f6152f5a9441f942 zsh.pre-deinstall"
+a5e93cd6880da04a63fc4fcaaa03987f zprofile"
+sha256sums="eb220ae5a8076191ec6b4c6a5a2f18122d074a19f25b45f0320b44b8166c5a03 zsh-5.0.2.tar.bz2
+e3c3625d966c8277274798f26241857df5fc520e18674deba6cc356f6b022d63 zprofile"
+sha512sums="096e9fee085bbcb88035984c28cc9d186ae549f9ab09d699f380438b82fcf09b03ac2e9635ddb3cef9d0f287403c10fd29d21ec18f79e8bfab63760db738a07d zsh-5.0.2.tar.bz2
+59182b99447872ded8adf0d890e9359ee47fce0b7acb2808f4308f945885fbf6d977a0917bbb5c0f21454caf3ba06ab092127732da4f84292d6ab0989a0110fe zprofile"
diff --git a/main/zsh/zprofile b/main/zsh/zprofile
new file mode 100644
index 000000000..03d316f1a
--- /dev/null
+++ b/main/zsh/zprofile
@@ -0,0 +1,22 @@
+#
+# /etc/zprofile and ~/.zprofile are run for login shells
+#
+
+PATH="$PATH:$HOME/bin"
+export PATH
+
+_src_etc_profile()
+{
+ # Make /etc/profile happier, and have possible ~/.zshenv options like
+ # NOMATCH ignored.
+ #
+ emulate -L ksh
+
+ # source profile
+ if [ -f /etc/profile ]; then
+ source /etc/profile
+ fi
+}
+_src_etc_profile
+
+unset -f _src_etc_profile