# Maintainer: jc_gargma # Maintainer (Arch): Christian Hesse # I maintain this because: # AUR version lacks additional optimization and hardening flags pkgname=tmux pkgver=3.5_a pkgrel=1 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=('16216bd0877170dfcc64157085ba9013610b12b082548c7c9542cc0103198951') b2sums=('2314bc127f805071c9f2fe28be549b0948042a153aa68d997efc1dc0d6eba198b04aa16932d0a84b03250567100fb81c464919fcc8ba98660d3d0750ff5fe879') 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" }