aboutsummaryrefslogtreecommitdiffstats
path: root/main/tmux/APKBUILD
blob: e76eacf87698e6fc449fec80e25e362c40470796 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
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"