2015-10-05 20:30:26 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# In this configuration, the following dependent libraries are compiled:
|
|
|
|
#
|
|
|
|
# * zlib
|
|
|
|
# * c-ares
|
|
|
|
# * expat
|
|
|
|
# * sqlite3
|
|
|
|
# * openSSL
|
|
|
|
# * libssh2
|
|
|
|
|
|
|
|
#COMPILER AND PATH
|
|
|
|
PREFIX=/opt/aria2/build_libs
|
|
|
|
C_COMPILER="gcc"
|
|
|
|
CXX_COMPILER="g++"
|
|
|
|
|
|
|
|
## DEPENDENCES ##
|
|
|
|
ZLIB=http://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz
|
2016-03-06 13:17:21 +01:00
|
|
|
OPENSSL=http://www.openssl.org/source/openssl-1.0.2g.tar.gz
|
2016-03-14 16:55:10 +01:00
|
|
|
EXPAT=https://sourceforge.net/projects/expat/files/expat/2.1.1/expat-2.1.1.tar.bz2
|
2016-04-06 16:25:14 +02:00
|
|
|
SQLITE3=http://www.sqlite.org/2016/sqlite-autoconf-3120000.tar.gz
|
2016-02-19 13:19:37 +01:00
|
|
|
C_ARES=http://c-ares.haxx.se/download/c-ares-1.11.0.tar.gz
|
2016-02-24 20:36:11 +01:00
|
|
|
SSH2=http://www.libssh2.org/download/libssh2-1.7.0.tar.gz
|
2015-10-05 20:30:26 +02:00
|
|
|
|
|
|
|
## CONFIG ##
|
|
|
|
BUILD_DIRECTORY=/tmp/
|
|
|
|
|
|
|
|
## BUILD ##
|
|
|
|
cd $BUILD_DIRECTORY
|
|
|
|
#
|
|
|
|
# zlib build
|
|
|
|
wget -c $ZLIB
|
|
|
|
tar zxvf zlib-1.2.8.tar.gz
|
|
|
|
cd zlib-1.2.8/
|
|
|
|
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --prefix=$PREFIX --static
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
#
|
|
|
|
# expat build
|
|
|
|
cd ..
|
|
|
|
wget -c $EXPAT
|
2016-03-14 16:55:10 +01:00
|
|
|
tar jxvf expat-2.1.1.tar.bz2
|
|
|
|
cd expat-2.1.1/
|
2016-03-14 17:01:56 +01:00
|
|
|
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --prefix=$PREFIX --enable-static --enable-shared
|
2015-10-05 20:30:26 +02:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
#
|
|
|
|
# c-ares build
|
|
|
|
cd ..
|
|
|
|
wget -c $C_ARES
|
2016-02-19 13:19:37 +01:00
|
|
|
tar zxvf c-ares-1.11.0.tar.gz
|
|
|
|
cd c-ares-1.11.0/
|
2015-10-05 20:30:26 +02:00
|
|
|
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --prefix=$PREFIX --enable-static --disable-shared
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
#
|
|
|
|
# Openssl build
|
|
|
|
cd ..
|
|
|
|
wget -c $OPENSSL
|
2016-03-06 13:17:21 +01:00
|
|
|
tar zxvf openssl-1.0.2g.tar.gz
|
|
|
|
cd openssl-1.0.2g/
|
2016-02-18 21:43:18 +01:00
|
|
|
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./Configure --prefix=$PREFIX linux-x86_64 shared
|
2015-10-05 20:30:26 +02:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
#
|
|
|
|
# sqlite3
|
|
|
|
cd ..
|
|
|
|
wget -c $SQLITE3
|
2016-04-06 16:25:14 +02:00
|
|
|
tar zxvf sqlite-autoconf-3120000.tar.gz
|
|
|
|
cd sqlite-autoconf-3120000/
|
2016-02-18 21:43:18 +01:00
|
|
|
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --prefix=$PREFIX --enable-static --enable-shared
|
2015-10-05 20:30:26 +02:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
#
|
|
|
|
# libssh2
|
|
|
|
cd ..
|
|
|
|
wget -c $SSH2
|
2016-02-24 20:36:11 +01:00
|
|
|
tar zxvf libssh2-1.7.0.tar.gz
|
|
|
|
cd libssh2-1.7.0/
|
2015-10-17 16:55:37 +02:00
|
|
|
rm -rf $PREFIX/lib/pkgconfig/libssh2.pc
|
|
|
|
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --without-libgcrypt --with-openssl --without-wincng --prefix=$PREFIX --enable-static --disable-shared
|
2015-10-05 20:30:26 +02:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
#
|
|
|
|
#cleaning
|
|
|
|
cd ..
|
|
|
|
rm -rf c-ares*
|
|
|
|
rm -rf sqlite-autoconf*
|
|
|
|
rm -rf zlib-*
|
|
|
|
rm -rf expat-*
|
|
|
|
rm -rf openssl-*
|
|
|
|
rm -rf libssh2-*
|
|
|
|
#
|
|
|
|
echo "finished!"
|