-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathinstall-libs.sh
executable file
·57 lines (50 loc) · 1.11 KB
/
install-libs.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
#!/bin/bash
INSTALLDIR=$PWD/vendor/install
mkdir -p $INSTALLDIR
ZLIB_DIR=$PWD/vendor/zlib
pushd $ZLIB_DIR
./configure --prefix=$INSTALLDIR
make
make install
popd
LIBGPG_ERROR_DIR=$PWD/vendor/libgpg-error
pushd $LIBGPG_ERROR_DIR
./autogen.sh
./configure \
--prefix=$INSTALLDIR \
--disable-dependency-tracking \
--disable-silent-rules \
--disable-nls \
--disable-doc \
--enable-static
make
make install
popd
LIBGCRYPT_DIR=$PWD/vendor/libgcrypt
pushd $LIBGCRYPT_DIR
./autogen.sh
./configure \
--prefix=$INSTALLDIR \
--enable-static \
--disable-dependency-tracking \
--disable-silent-rules \
--disable-doc \
--disable-asm
make
make install
popd
LIBSSH_DIR=$PWD/vendor/libssh
LIBSSH_BUILDDIR=$LIBSSH_DIR/build
mkdir -p $LIBSSH_BUILDDIR
pushd $LIBSSH_BUILDDIR
cmake \
-DWITH_STATIC_LIB=ON \
-DWITH_GSSAPI=OFF \
-DWITH_GCRYPT=ON \
-DWITH_SERVER=ON \
..
make
make DESTDIR=$INSTALLDIR install
popd
export CGO_LDFLAGS="-L$INSTALLDIR/lib -L$INSTALLDIR/usr/local/lib -lssh -lgcrypt -lgpg-error -lz"
export CGO_CFLAGS="-I$INSTALLDIR/include -I$INSTALLDIR/usr/local/include"