# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=tmux pkgver=2.0 pkgrel=3 pkgdesc="Tool to control multiple terminals from a single terminal" url="http://tmux.sourceforge.net/" arch="all" license="BSD" depends="ncurses-terminfo" makedepends="ncurses-dev libevent-dev autoconf automake bsd-compat-headers" install= subpackages=" $pkgname-doc $pkgname-vim:vim $pkgname-bash-completion:bashcomp" source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz" _builddir="$srcdir/$pkgname-$pkgver" prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p0 -i "$srcdir"/$i || return 1;; esac done aclocal && autoconf && automake --add-missing --force || return 1 } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ || return 1 make || return 1 } package() { cd "$srcdir/$pkgname-$pkgver" make DESTDIR="$pkgdir" install || return 1 } vim() { depends="" pkgdesc="Vim syntax for $pkgname" install_if="vim $pkgname=$pkgver-r$pkgrel" arch="noarch" install -Dm644 "$_builddir"/examples/$pkgname.vim \ "$subpkgdir"/usr/share/vim/vimfiles/syntax/$pkgname.vim } bashcomp() { depends="" pkgdesc="Bash completion for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" arch="noarch" install -Dm644 "$srcdir"/tmux-$pkgver/examples/bash_completion_tmux.sh \ "$subpkgdir"/usr/share/bash-completion/completions/tmux } md5sums="9fb6b443392c3978da5d599f1e814eaa tmux-2.0.tar.gz" sha256sums="795f4b4446b0ea968b9201c25e8c1ef8a6ade710ebca4657dd879c35916ad362 tmux-2.0.tar.gz" sha512sums="8a4be40ceb9b371a91107173de08348c4379b103454fa397ee326506f78a5fda1034dc7148c090c687221eddb8a2fc0c3aeb85da57841df6bcd74fb5f4f5f53d tmux-2.0.tar.gz"