# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=tmux pkgver=2.1 pkgrel=2 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="https://github.com/tmux/tmux/releases/download/$pkgver/tmux-$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="74a2855695bccb51b6e301383ad4818c tmux-2.1.tar.gz" sha256sums="31564e7bf4bcef2defb3cb34b9e596bd43a3937cad9e5438701a81a5a9af6176 tmux-2.1.tar.gz" sha512sums="0faa0a60a84b777ca3cf572cf741d0e4f82a9f32d27dfeddfda41bad57830823a6d5f2323f27ba794b86e194d9f7db7028c94dc6a15bb4ac5a18508f890bdaa4 tmux-2.1.tar.gz"