forked from mah0x211/node-ossp-uuid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·58 lines (47 loc) · 1.21 KB
/
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
#!/bin/sh
set -e
CWD=`pwd`
MOD_LIBS="${CWD}/libs"
MOD_DEPEND="${CWD}/depend"
LIB_UUID='uuid-1.6.2'
if [ ! -d ${MOD_DEPEND} ]; then
if [ ! -d ${MOD_LIBS} ]; then
echo "mkdir ${MOD_LIBS}"
mkdir ${MOD_LIBS}
fi
echo "cd ${MOD_LIBS}"
cd ${MOD_LIBS}
if [ ! -d "${LIB_UUID}" -a ! -f "${LIB_UUID}.tar.gz" ]; then
echo "wget http://gnome-build-stage-1.googlecode.com/files/${LIB_UUID}.tar.gz"
wget http://gnome-build-stage-1.googlecode.com/files/${LIB_UUID}.tar.gz
if [ ! -f "${LIB_UUID}.tar.gz" ]; then
exit -1;
fi
fi
if [ -f "${LIB_UUID}.tar.gz" ]; then
echo "tar xvzf ./${LIB_UUID}.tar.gz"
tar xvzf "${LIB_UUID}.tar.gz"
rm ${LIB_UUID}.tar.gz
fi
echo "cd ${LIB_UUID}"
cd ${LIB_UUID}
# configure
CONFIGURE="--prefix=${MOD_DEPEND}"
echo "./configure ${CONFIGURE}"
./configure ${CONFIGURE}
echo "make"
make
echo "make check"
make check
echo "make install"
make install
echo "cd ${CWD}";
cd ${CWD}
fi
CPPFLAGS="-I${MOD_DEPEND}/include"
LINKFLAGS="-L${MOD_DEPEND}/lib"
LDFLAGS="-L${MOD_DEPEND}/lib"
export CPPFLAGS
export LINKFLAGS
export LDFLAGS
node-gyp rebuild