diff options
author | Matt Hamilton | 2015-06-09 12:44:15 -0400 |
---|---|---|
committer | Matt Hamilton | 2015-06-09 12:44:15 -0400 |
commit | 40843928a3258dd1e40baf0a3e91b29d5aa9f1f6 (patch) | |
tree | 19db12ad4bbc7cf9f3a3dca12bc1bd45d821e909 | |
download | aur-40843928a3258dd1e40baf0a3e91b29d5aa9f1f6.tar.gz |
Initial import
-rw-r--r-- | .AURINFO | 24 | ||||
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 55 | ||||
-rw-r--r-- | install | 66 |
4 files changed, 169 insertions, 0 deletions
diff --git a/.AURINFO b/.AURINFO new file mode 100644 index 000000000000..83d22c4480e6 --- /dev/null +++ b/.AURINFO @@ -0,0 +1,24 @@ +pkgbase = prezto-git + pkgdesc = Instantly Awesome Zsh. A configuration framework for Zsh that comes with modules, enriching the command line interface environment with sane defaults, aliases, functions, auto completion, and prompt themes. + pkgver = r1426.6f9c166 + pkgrel = 1 + url = https://github.com/sorin-ionescu/prezto/ + install = install + arch = any + license = MIT + makedepends = git + makedepends = coreutils + makedepends = sed + depends = zsh>=4.3.10 + backup = etc/zsh/zlogin + backup = etc/zsh/zlogout + backup = etc/zsh/zpreztorc + backup = etc/zsh/zshenv + backup = etc/zsh/zshrc + source = git://github.com/sorin-ionescu/prezto.git + source = install + md5sums = SKIP + md5sums = 32c84ec04a6fa7bde49da86aec822906 + +pkgname = prezto-git + diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..83d22c4480e6 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = prezto-git + pkgdesc = Instantly Awesome Zsh. A configuration framework for Zsh that comes with modules, enriching the command line interface environment with sane defaults, aliases, functions, auto completion, and prompt themes. + pkgver = r1426.6f9c166 + pkgrel = 1 + url = https://github.com/sorin-ionescu/prezto/ + install = install + arch = any + license = MIT + makedepends = git + makedepends = coreutils + makedepends = sed + depends = zsh>=4.3.10 + backup = etc/zsh/zlogin + backup = etc/zsh/zlogout + backup = etc/zsh/zpreztorc + backup = etc/zsh/zshenv + backup = etc/zsh/zshrc + source = git://github.com/sorin-ionescu/prezto.git + source = install + md5sums = SKIP + md5sums = 32c84ec04a6fa7bde49da86aec822906 + +pkgname = prezto-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e7becfbed9c1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Eriner <M@tthamilton.com> + +pkgrel=1 +pkgver=r1426.6f9c166 +pkgname=prezto-git +pkgdesc="Instantly Awesome Zsh. A configuration framework for Zsh that comes with modules, enriching the command line interface environment with sane defaults, aliases, functions, auto completion, and prompt themes." +url="https://github.com/sorin-ionescu/prezto/" +arch=('any') +license=('MIT') +depends=('zsh>=4.3.10') +makedepends=('git' 'coreutils' 'sed') +source=('git://github.com/sorin-ionescu/prezto.git' 'install') +install='install' +md5sums=('SKIP' '32c84ec04a6fa7bde49da86aec822906') +_gitname='prezto' + +backup=('etc/zsh/zlogin' 'etc/zsh/zlogout' 'etc/zsh/zpreztorc' 'etc/zsh/zshenv' 'etc/zsh/zshrc') + +pkgver() { + cd "$srcdir/$_gitname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd $srcdir/$_gitname + git submodule update --init --recursive + + mkdir -p $srcdir/etc/zsh + + rm -f $srcdir/etc/zsh/* + + echo "source /etc/zsh/zpreztorc" > "$srcdir/etc/zsh/zshrc" + echo "source /usr/lib/prezto/init.zsh" >> "$srcdir/etc/zsh/zshrc" + + + sed -i 's#\${ZDOTDIR:-\$HOME}/\.zprezto/#/usr/lib/prezto/#g' $srcdir/$_gitname/init.zsh + + for entry in ${backup[@]}; do + rcfile=$(basename $entry) + if [ -f $srcdir/$_gitname/runcoms/$rcfile ]; then + echo "source /usr/lib/prezto/runcoms/$rcfile" >> "$srcdir/etc/zsh/$rcfile" + fi + done +} + +package() { + mkdir -p $pkgdir/usr/lib/prezto + cp -r $srcdir/$_gitname/* $pkgdir/usr/lib/prezto + + mkdir -p $pkgdir/usr/share/doc/prezto + mv $pkgdir/usr/lib/prezto/*.md $pkgdir/usr/share/doc/prezto + + mkdir -p $pkgdir/etc + cp -r $srcdir/etc/zsh $pkgdir/etc +} diff --git a/install b/install new file mode 100644 index 000000000000..3186de99b8a8 --- /dev/null +++ b/install @@ -0,0 +1,66 @@ +#!/bin/bash + +post_install() { + + create_cache_dirs + + echo + echo "Prezto is enabled for all users by default." + echo "To change that, edit /etc/zsh/zshrc file." + echo "Global settings reside in the /etc/zsh/ directory." + echo "To personalize Zsh and Prezto, edit your local ~/.zshrc and ~/.zpreztorc files." + echo "A user can also have a custom, overriding Prezto installation in ~/.zprezto/" + echo +} + +post_upgrade() { + create_cache_dirs +} + +post_remove() { + remove_cache_dirs +} + +cachedir=/var/cache/prezto +moduledir=/usr/lib/prezto/modules + +# These modules (as of 20130820) want to have the cache within their own directory +modules_with_cache=( + 'node' + 'fasd' + 'perl' +) + +create_cache_dirs() { + + # Set up a global cache that's accessible by users. + # A user may be able to override this by loading and configuring/customizing the modules in her own .zshrc + mkdir -p $cachedir + + for module in "${modules_with_cache[@]}" + do + if [ ! -f $cachedir/$module/cache.zsh ]; then + mkdir $cachedir/$module + touch $cachedir/$module/cache.zsh + chgrp users $cachedir/$module/cache.zsh + chmod g+w $cachedir/$module/cache.zsh + fi + + if [ ! -a $moduledir/$module/cache.zsh ]; then + ln -sf $cachedir/$module/cache.zsh $moduledir/$module/cache.zsh + fi + done +} + +remove_cache_dirs() { + + # Remove symlinks that point to cache files + for module in "${modules_with_cache[@]}" + do + rm -rf $moduledir/$module/cache.zsh + done + + # Remove the global cache + rm -rf $cachedir +} + |