-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux_local_install.sh
executable file
·59 lines (49 loc) · 1.68 KB
/
tmux_local_install.sh
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
#!/bin/bash
# Exit on error #
set -e
MYHOME=/vol-th/home/huzx/lcq
# Clean up #
rm -rf $MYHOME/local/libevent
rm -rf $MYHOME/local/ncurses
rm -rf $MYHOME/local/tmux
# Variable version #
TMUX_VERSION=2.2
# Create our directories #
mkdir -p $MYHOME/local/libevent
mkdir -p $MYHOME/local/ncurses
mkdir -p $MYHOME/local/tmux
############
# libevent #
############
cd $MYHOME/local/src
tar xvzf libevent-2.0.21-stable.tar.gz
cd libevent-*/
./configure --prefix=$MYHOME/local/libevent --disable-shared
make
make install
############
# ncurses #
############
cd $MYHOME/local/src
tar xvzf ncurses-5.9.tar.gz
cd ncurses-5.9
./configure --prefix=$MYHOME/local/ncurses # On tianjing
#./configure --prefix=$MYHOME/local/ncurses LDFLAGS=-static # On lvliang
make
make install
############
# tmux #
############
cd $MYHOME/local/src
tar xvzf tmux-${TMUX_VERSION}.tar.gz
cd tmux-${TMUX_VERSION}
# open configure and find the line that says:
# PKG_CONFIG="pkg-config --static"
# And comment it out:
# #PKG_CONFIG="pkg-config --static"
# Build #
./configure --prefix=$MYHOME/local/tmux CFLAGS="-I$MYHOME/local/libevent/include -I$MYHOME/local/ncurses/include/ncurses -I$MYHOME/local/ncurses/include/" LDFLAGS="-L$MYHOME/local/libevent/lib -L$MYHOME/local/libevent/include -L$MYHOME/local/ncurses/lib -L$MYHOME/local/ncurses/include -L$MYHOME/local/ncurses/include/ncurses" PKG_CONFIG=/bin/false
CPPFLAGS="-I$MYHOME/local/libevent/include -I$MYHOME/local/ncurses/include -I$MYHOME/local/ncurses/include/ncurses" LDFLAGS="-L$MYHOME/local/libevent/lib -L$MYHOME/local/libevent/include -L$MYHOME/local/ncurses/lib -L$MYHOME/local/ncurses/include -L$MYHOME/local/ncurses/include/ncurses"
make
make install
echo "Ha! I am here!"