summaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: 43284730a3c140a09865ac45859995803136041a (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
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
# Maintainer (Arch): Christian Hesse <mail@eworm.de>

# I maintain this because:
# AUR version lacks additional optimization and hardening flags

pkgname=tmux
pkgver=3.3
pkgrel=2
pkgdesc='A terminal multiplexer'
url='https://github.com/tmux/tmux/wiki'
arch=('x86_64')
license=('BSD')
depends=('ncurses' 'libevent' 'libutempter')
source=("https://github.com/tmux/tmux/releases/download/${pkgver/_/}/tmux-${pkgver/_/}.tar.gz")
sha256sums=('b2382ac391f6a1c5b93293016cdc9488337d9a04b9d611ae05eac164740351dc')
b2sums=('7e5b66d6d294c580d86f4f8729f867277e00f401dfa2a4b4c5dd5bd08c1e9884122340cbebfb37f56c67c65e940667f5b79b638f20f05282c434f7b3641ad003')

build() {
	cd "$srcdir/$pkgname-${pkgver/_/}"

  export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=auto -fPIE"
  export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=auto -fPIE"
  export LDFLAGS="$LDFLAGS,-pie"

	./configure \
		--prefix=/usr \
		--enable-utempter
	make
}

package() {
	cd "$srcdir/$pkgname-${pkgver/_/}"

	make install DESTDIR="$pkgdir"
	install -D -m0644 COPYING "$pkgdir/usr/share/licenses/tmux/LICENSE"
}