# Maintainer: jc_gargma # Maintainer (Arch): Christian Hesse # I maintain this because: # AUR version lacks additional optimization and hardening flags pkgname=tmux pkgver=3.4 pkgrel=4 pkgdesc='Terminal multiplexer' url='https://github.com/tmux/tmux/wiki' arch=('x86_64') license=('BSD') depends=('libevent' 'libevent_core-2.1.so' 'libutempter' 'ncurses' 'libncursesw.so') # # For some reason this breaks compiling. "error: C compiler cannot create executables" # # But old-fashioned raw injection of -flto=auto via export doesn't. #options=('lto') source=("https://github.com/tmux/tmux/releases/download/${pkgver/_/}/tmux-${pkgver/_/}.tar.gz") sha256sums=('551ab8dea0bf505c0ad6b7bb35ef567cdde0ccb84357df142c254f35a23e19aa') b2sums=('2b1990b95d7439702e9287402d9828d4ecab573202c099aa482969c047b540d4b899f79d87587fc712e727d9cebf5fa7393512087e469fc355b4a30b1894e229') build() { cd "$pkgname-${pkgver/_/}" export CFLAGS="$CFLAGS -O3 -fstack-protector-all -fPIE -flto=auto" export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -fPIE -flto=auto" export LDFLAGS="$LDFLAGS,-pie" ./configure \ --prefix=/usr \ --enable-sixel \ --enable-utempter make } package() { cd "$pkgname-${pkgver/_/}" make install DESTDIR="$pkgdir" install -D -m0644 COPYING "$pkgdir/usr/share/licenses/tmux/LICENSE" }