# download source files for tmux, libevent, and ncurses
# extract files, configure, and compile
############ # libevent # ############ tar xvzf libevent-2.1.8-stable.tar.gz cd libevent-2.1.8-stable ./configure --prefix=$INSTALL_DIR/local --disable-shared make make install cd ..
############ # ncurses # ############ if [[ $(fs --version) =~ "afs" ]] && fs whereis "$HOME/local" ; then NCURSES_OPTION=" --enable-symlinks" else NCURSES_OPTION="" fi
tar xvzf ncurses-5.9.tar.gz cd ncurses-5.9 ./configure --prefix=$INSTALL_DIR/local $NCURSES_OPTION make make install cd .. ############ # tmux # ############ tar xvzf tmux-${TMUX_VERSION}.tar.gz cd tmux-${TMUX_VERSION} sh ./autogen.sh ./configure CFLAGS="-I$INSTALL_DIR/local/include -I$INSTALL_DIR/local/include/ncurses" LDFLAGS="-L$INSTALL_DIR/local/lib -L$INSTALL_DIR/local/include/ncurses -L$INSTALL_DIR/local/include" CPPFLAGS="-I$INSTALL_DIR/local/include -I$INSTALL_DIR/local/include/ncurses" LDFLAGS="-static -L$INSTALL_DIR/local/include -L$INSTALL_DIR/local/include/ncurses -L$INSTALL_DIR/local/lib" make cp tmux $INSTALL_DIR/local/bin cd ..
# cleanup rm -rf $INSTALL_DIR/tmux_tmp
echo "$INSTALL_DIR/local/bin/tmux is now available. You can optionally add $INSTALL_DIR/local/bin to your PATH."