Use 'aria2c' if is available to download dependencies

This commit is contained in:
q3aql 2016-05-04 23:37:45 +02:00
parent 55ac3f92c1
commit 64a9c2528d
4 changed files with 56 additions and 24 deletions

View File

@ -16,6 +16,14 @@ PREFIX=/opt/aria2-i386/build_libs
C_COMPILER="gcc" C_COMPILER="gcc"
CXX_COMPILER="g++" CXX_COMPILER="g++"
#CHECK TOOL FOR DOWNLOAD
aria2c --help > /dev/null
if [ "$?" -eq 0 ] ; then
DOWNLOADER="aria2c --check-certificate=false"
else
DOWNLOADER="wget -c"
fi
## DEPENDENCES ## ## DEPENDENCES ##
ZLIB=http://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz ZLIB=http://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz
OPENSSL=http://www.openssl.org/source/openssl-1.0.2h.tar.gz OPENSSL=http://www.openssl.org/source/openssl-1.0.2h.tar.gz
@ -34,7 +42,7 @@ export CXXFLAGS="-m32"
export LDFLAGS="-m32" export LDFLAGS="-m32"
# #
# zlib build # zlib build
wget -c $ZLIB $DOWNLOADER $ZLIB
tar zxvf zlib-1.2.8.tar.gz tar zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8/ cd zlib-1.2.8/
CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER -m32" CXX="$CXX_COMPILER -m32" ./configure --prefix=$PREFIX --static CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER -m32" CXX="$CXX_COMPILER -m32" ./configure --prefix=$PREFIX --static
@ -43,7 +51,7 @@ export LDFLAGS="-m32"
# #
# expat build # expat build
cd .. cd ..
wget -c $EXPAT $DOWNLOADER $EXPAT
tar jxvf expat-2.1.1.tar.bz2 tar jxvf expat-2.1.1.tar.bz2
cd expat-2.1.1/ cd expat-2.1.1/
CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER -m32" CXX="$CXX_COMPILER -m32" ./configure --prefix=$PREFIX --enable-static --enable-shared CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER -m32" CXX="$CXX_COMPILER -m32" ./configure --prefix=$PREFIX --enable-static --enable-shared
@ -52,7 +60,7 @@ export LDFLAGS="-m32"
# #
# c-ares build # c-ares build
cd .. cd ..
wget -c $C_ARES $DOWNLOADER $C_ARES
tar zxvf c-ares-1.11.0.tar.gz tar zxvf c-ares-1.11.0.tar.gz
cd c-ares-1.11.0/ cd c-ares-1.11.0/
CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER -m32" CXX="$CXX_COMPILER -m32" ./configure --prefix=$PREFIX --enable-static --disable-shared CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER -m32" CXX="$CXX_COMPILER -m32" ./configure --prefix=$PREFIX --enable-static --disable-shared
@ -61,7 +69,7 @@ export LDFLAGS="-m32"
# #
# Openssl build # Openssl build
cd .. cd ..
wget -c $OPENSSL $DOWNLOADER $OPENSSL
tar zxvf openssl-1.0.2h.tar.gz tar zxvf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h/ cd openssl-1.0.2h/
CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER -m32" CXX="$CXX_COMPILER -m32" ./Configure --prefix=$PREFIX linux-elf shared CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER -m32" CXX="$CXX_COMPILER -m32" ./Configure --prefix=$PREFIX linux-elf shared
@ -70,7 +78,7 @@ export LDFLAGS="-m32"
# #
# sqlite3 # sqlite3
cd .. cd ..
wget -c $SQLITE3 $DOWNLOADER $SQLITE3
tar zxvf sqlite-autoconf-3120200.tar.gz tar zxvf sqlite-autoconf-3120200.tar.gz
cd sqlite-autoconf-3120200/ cd sqlite-autoconf-3120200/
CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER -m32" CXX="$CXX_COMPILER -m32" ./configure --prefix=$PREFIX --enable-static --enable-shared CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER -m32" CXX="$CXX_COMPILER -m32" ./configure --prefix=$PREFIX --enable-static --enable-shared
@ -79,7 +87,7 @@ export LDFLAGS="-m32"
# #
# libssh2 # libssh2
cd .. cd ..
wget -c $SSH2 $DOWNLOADER $SSH2
tar zxvf libssh2-1.7.0.tar.gz tar zxvf libssh2-1.7.0.tar.gz
cd libssh2-1.7.0/ cd libssh2-1.7.0/
rm -rf $PREFIX/lib/pkgconfig/libssh2.pc rm -rf $PREFIX/lib/pkgconfig/libssh2.pc

View File

@ -14,6 +14,14 @@ PREFIX=/opt/aria2/build_libs
C_COMPILER="gcc" C_COMPILER="gcc"
CXX_COMPILER="g++" CXX_COMPILER="g++"
#CHECK TOOL FOR DOWNLOAD
aria2c --help > /dev/null
if [ "$?" -eq 0 ] ; then
DOWNLOADER="aria2c --check-certificate=false"
else
DOWNLOADER="wget -c"
fi
## DEPENDENCES ## ## DEPENDENCES ##
ZLIB=http://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz ZLIB=http://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz
OPENSSL=http://www.openssl.org/source/openssl-1.0.2h.tar.gz OPENSSL=http://www.openssl.org/source/openssl-1.0.2h.tar.gz
@ -29,7 +37,7 @@ BUILD_DIRECTORY=/tmp/
cd $BUILD_DIRECTORY cd $BUILD_DIRECTORY
# #
# zlib build # zlib build
wget -c $ZLIB $DOWNLOADER $ZLIB
tar zxvf zlib-1.2.8.tar.gz tar zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8/ 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 PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --prefix=$PREFIX --static
@ -38,7 +46,7 @@ cd $BUILD_DIRECTORY
# #
# expat build # expat build
cd .. cd ..
wget -c $EXPAT $DOWNLOADER $EXPAT
tar jxvf expat-2.1.1.tar.bz2 tar jxvf expat-2.1.1.tar.bz2
cd expat-2.1.1/ cd expat-2.1.1/
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --prefix=$PREFIX --enable-static --enable-shared PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --prefix=$PREFIX --enable-static --enable-shared
@ -47,7 +55,7 @@ cd $BUILD_DIRECTORY
# #
# c-ares build # c-ares build
cd .. cd ..
wget -c $C_ARES $DOWNLOADER $C_ARES
tar zxvf c-ares-1.11.0.tar.gz tar zxvf c-ares-1.11.0.tar.gz
cd c-ares-1.11.0/ cd c-ares-1.11.0/
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --prefix=$PREFIX --enable-static --disable-shared PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --prefix=$PREFIX --enable-static --disable-shared
@ -56,7 +64,7 @@ cd $BUILD_DIRECTORY
# #
# Openssl build # Openssl build
cd .. cd ..
wget -c $OPENSSL $DOWNLOADER $OPENSSL
tar zxvf openssl-1.0.2h.tar.gz tar zxvf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h/ cd openssl-1.0.2h/
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./Configure --prefix=$PREFIX linux-x86_64 shared PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./Configure --prefix=$PREFIX linux-x86_64 shared
@ -65,7 +73,7 @@ cd $BUILD_DIRECTORY
# #
# sqlite3 # sqlite3
cd .. cd ..
wget -c $SQLITE3 $DOWNLOADER $SQLITE3
tar zxvf sqlite-autoconf-3120200.tar.gz tar zxvf sqlite-autoconf-3120200.tar.gz
cd sqlite-autoconf-3120200/ cd sqlite-autoconf-3120200/
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --prefix=$PREFIX --enable-static --enable-shared PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ LD_LIBRARY_PATH=$PREFIX/lib/ CC="$C_COMPILER" CXX="$CXX_COMPILER" ./configure --prefix=$PREFIX --enable-static --enable-shared
@ -74,7 +82,7 @@ cd $BUILD_DIRECTORY
# #
# libssh2 # libssh2
cd .. cd ..
wget -c $SSH2 $DOWNLOADER $SSH2
tar zxvf libssh2-1.7.0.tar.gz tar zxvf libssh2-1.7.0.tar.gz
cd libssh2-1.7.0/ cd libssh2-1.7.0/
rm -rf $PREFIX/lib/pkgconfig/libssh2.pc rm -rf $PREFIX/lib/pkgconfig/libssh2.pc

View File

@ -11,6 +11,14 @@
#IMPORTANT: Require install gcc-mingw-w64-i686 g++-mingw-w64-i686 #IMPORTANT: Require install gcc-mingw-w64-i686 g++-mingw-w64-i686
#CHECK TOOL FOR DOWNLOAD
aria2c --help > /dev/null
if [ "$?" -eq 0 ] ; then
DOWNLOADER="aria2c --check-certificate=false"
else
DOWNLOADER="wget -c"
fi
## DEPENDENCES ## ## DEPENDENCES ##
ZLIB=http://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz ZLIB=http://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz
OPENSSL=http://www.openssl.org/source/openssl-1.0.2h.tar.gz OPENSSL=http://www.openssl.org/source/openssl-1.0.2h.tar.gz
@ -28,7 +36,7 @@ PREFIX=/usr/i686-w64-mingw32
cd $BUILD_DIRECTORY cd $BUILD_DIRECTORY
# #
# zlib build # zlib build
wget -c $ZLIB $DOWNLOADER $ZLIB
tar zxvf zlib-1.2.8.tar.gz tar zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8/ cd zlib-1.2.8/
CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --static CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --static
@ -37,7 +45,7 @@ cd $BUILD_DIRECTORY
# #
# expat build # expat build
cd .. cd ..
wget -c $EXPAT $DOWNLOADER $EXPAT
tar jxvf expat-2.1.1.tar.bz2 tar jxvf expat-2.1.1.tar.bz2
cd expat-2.1.1/ cd expat-2.1.1/
CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --enable-shared CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --enable-shared
@ -46,7 +54,7 @@ cd $BUILD_DIRECTORY
# #
# c-ares build # c-ares build
cd .. cd ..
wget -c $C_ARES $DOWNLOADER $C_ARES
tar zxvf c-ares-1.11.0.tar.gz tar zxvf c-ares-1.11.0.tar.gz
cd c-ares-1.11.0/ cd c-ares-1.11.0/
CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --disable-shared CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --disable-shared
@ -55,7 +63,7 @@ cd $BUILD_DIRECTORY
# #
# Openssl build # Openssl build
cd .. cd ..
wget -c $OPENSSL $DOWNLOADER $OPENSSL
tar zxvf openssl-1.0.2h.tar.gz tar zxvf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h/ cd openssl-1.0.2h/
./Configure mingw --cross-compile-prefix=$HOST- --prefix=$PREFIX shared ./Configure mingw --cross-compile-prefix=$HOST- --prefix=$PREFIX shared
@ -64,7 +72,7 @@ cd $BUILD_DIRECTORY
# #
# sqlite3 # sqlite3
cd .. cd ..
wget -c $SQLITE3 $DOWNLOADER $SQLITE3
tar zxvf sqlite-autoconf-3120200.tar.gz tar zxvf sqlite-autoconf-3120200.tar.gz
cd sqlite-autoconf-3120200/ cd sqlite-autoconf-3120200/
CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --enable-shared CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --enable-shared
@ -73,7 +81,7 @@ cd $BUILD_DIRECTORY
# #
# libssh2 # libssh2
cd .. cd ..
wget -c $SSH2 $DOWNLOADER $SSH2
tar zxvf libssh2-1.7.0.tar.gz tar zxvf libssh2-1.7.0.tar.gz
cd libssh2-1.7.0/ cd libssh2-1.7.0/
rm -rf $PREFIX/lib/pkgconfig/libssh2.pc rm -rf $PREFIX/lib/pkgconfig/libssh2.pc

View File

@ -11,6 +11,14 @@
#IMPORTANT: Require install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 #IMPORTANT: Require install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64
#CHECK TOOL FOR DOWNLOAD
aria2c --help > /dev/null
if [ "$?" -eq 0 ] ; then
DOWNLOADER="aria2c --check-certificate=false"
else
DOWNLOADER="wget -c"
fi
## DEPENDENCES ## ## DEPENDENCES ##
ZLIB=http://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz ZLIB=http://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz
OPENSSL=http://www.openssl.org/source/openssl-1.0.2h.tar.gz OPENSSL=http://www.openssl.org/source/openssl-1.0.2h.tar.gz
@ -28,7 +36,7 @@ PREFIX=/usr/x86_64-w64-mingw32
cd $BUILD_DIRECTORY cd $BUILD_DIRECTORY
# #
# zlib build # zlib build
wget -c $ZLIB $DOWNLOADER $ZLIB
tar zxvf zlib-1.2.8.tar.gz tar zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8/ cd zlib-1.2.8/
CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --static CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --static
@ -37,7 +45,7 @@ cd $BUILD_DIRECTORY
# #
# expat build # expat build
cd .. cd ..
wget -c $EXPAT $DOWNLOADER $EXPAT
tar jxvf expat-2.1.1.tar.bz2 tar jxvf expat-2.1.1.tar.bz2
cd expat-2.1.1/ cd expat-2.1.1/
CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --enable-shared CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --enable-shared
@ -46,7 +54,7 @@ cd $BUILD_DIRECTORY
# #
# c-ares build # c-ares build
cd .. cd ..
wget -c $C_ARES $DOWNLOADER $C_ARES
tar zxvf c-ares-1.11.0.tar.gz tar zxvf c-ares-1.11.0.tar.gz
cd c-ares-1.11.0/ cd c-ares-1.11.0/
CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --disable-shared CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --disable-shared
@ -55,7 +63,7 @@ cd $BUILD_DIRECTORY
# #
# Openssl build # Openssl build
cd .. cd ..
wget -c $OPENSSL $DOWNLOADER $OPENSSL
tar zxvf openssl-1.0.2h.tar.gz tar zxvf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h/ cd openssl-1.0.2h/
./Configure mingw64 --cross-compile-prefix=$HOST- --prefix=$PREFIX shared ./Configure mingw64 --cross-compile-prefix=$HOST- --prefix=$PREFIX shared
@ -64,7 +72,7 @@ cd $BUILD_DIRECTORY
# #
# sqlite3 # sqlite3
cd .. cd ..
wget -c $SQLITE3 $DOWNLOADER $SQLITE3
tar zxvf sqlite-autoconf-3120200.tar.gz tar zxvf sqlite-autoconf-3120200.tar.gz
cd sqlite-autoconf-3120200/ cd sqlite-autoconf-3120200/
CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --enable-shared CC=$HOST-gcc CXX=$HOST-g++ AR=$HOST-ar RANLIB=$HOST-ranlib ./configure --prefix=$PREFIX --host=$HOST --enable-static --enable-shared
@ -73,7 +81,7 @@ cd $BUILD_DIRECTORY
# #
# libssh2 # libssh2
cd .. cd ..
wget -c $SSH2 $DOWNLOADER $SSH2
tar zxvf libssh2-1.7.0.tar.gz tar zxvf libssh2-1.7.0.tar.gz
cd libssh2-1.7.0/ cd libssh2-1.7.0/
rm -rf $PREFIX/lib/pkgconfig/libssh2.pc rm -rf $PREFIX/lib/pkgconfig/libssh2.pc