qbittorrent

Created Diff never expires
24 removals
Words removed43
Total words169
Words removed (%)25.44
66 lines
4 additions
Words added5
Total words131
Words added (%)3.82
48 lines
#!/bin/bash
#!/bin/sh
set -e
set -e
apt update -y
apt install -y build-essential git perl python2.7 libboost-all-dev libboost-tools-dev zlib1g-dev autoconf libssl-dev
apt install -y build-essential git perl python2.7 python2.7-dev zlib1g-dev autoconf libicu-dev libssl-dev pkg-config


QBITTORRENT_TAG=v4_2_x
QBITTORRENT_TAG=v4_2_x
LIBTORRENT_TAG=RC_1_2
LIBTORRENT_TAG=RC_1_2
QT5_TAG=5.12
QT5_TAG=5.12
BOOST_VER=1.72.0
BOOST_BUILD_TAG=boost-$BOOST_VER


rm -rf work
rm -rf work
mkdir work
mkdir work
cd work
cd work


BOOST_FILE_NAME="boost_${BOOST_VER//./_}.tar.gz"
wget https://dl.bintray.com/boostorg/release/$BOOST_VER/source/$BOOST_FILE_NAME
tar xzvf $BOOST_FILE_NAME
cd boost_${BOOST_VER//./_}
./bootstrap.sh
./b2 link=static cxxflags=-std=c++14 install
cd ..

git clone https://github.com/boostorg/build.git --branch $BOOST_BUILD_TAG --single-branch --depth 1
cd build
./bootstrap.sh
./b2 cxxflags=-std=c++14 install
cd ..

git clone https://github.com/qt/qtbase.git --branch $QT5_TAG --single-branch --depth 1
git clone https://github.com/qt/qtbase.git --branch $QT5_TAG --single-branch --depth 1
cd qtbase
cd qtbase
./configure -static -openssl-linked -opensource \
./configure -static -openssl-linked -opensource \
-confirm-license -c++std 14 -no-opengl -no-dbus -no-widgets -no-gui -no-compile-examples \
-confirm-license -c++std 14 -no-opengl -no-dbus -no-widgets -no-gui -no-compile-examples \
-prefix `pwd`/../qt-qbittorrent
-prefix `pwd`/../qt-qbittorrent
make -j$(nproc)
make -j$(nproc)
make install
make install
cd ..
cd ..


PATH="`pwd`/qt-qbittorrent/bin:$PATH"
PATH="`pwd`/qt-qbittorrent/bin:$PATH"


git clone https://github.com/qt/qttools.git --branch $QT5_TAG --single-branch --depth 1
git clone https://github.com/qt/qttools.git --branch $QT5_TAG --single-branch --depth 1
cd qttools
cd qttools
qmake
qmake
make -j$(nproc)
make -j$(nproc)
make install
make install
cd ..
cd ..


git clone https://github.com/arvidn/libtorrent.git --branch $LIBTORRENT_TAG --single-branch --depth 1
git clone https://github.com/arvidn/libtorrent.git --branch $LIBTORRENT_TAG --single-branch --depth 1
cd libtorrent
cd libtorrent
b2 link=static variant=release boost-link=static dht=on encryption=on crypto=openssl i2p=on extensions=on cxxflags=-std=c++14
b2 link=static variant=release boost-link=static dht=on encryption=on crypto=openssl i2p=on extensions=on
cd ..
cd ..


git clone https://github.com/qbittorrent/qBittorrent.git --branch $QBITTORRENT_TAG --single-branch --depth 1
git clone https://github.com/qbittorrent/qBittorrent.git --branch $QBITTORRENT_TAG --single-branch --depth 1
cd qBittorrent
cd qBittorrent
QT_QMAKE=`pwd`/../qt-qbittorrent/bin \
QT_QMAKE=`pwd`/../qt-qbittorrent/bin \
LDFLAGS="-l:libboost_system.a" \
LDFLAGS="-l:libboost_system.a" \
CXXFLAGS="-std=c++14" \
CXXFLAGS="-std=c++14" \
libtorrent_CFLAGS="-I`pwd`/../libtorrent/include" \
libtorrent_CFLAGS="-I`pwd`/../libtorrent/include" \
libtorrent_LIBS="-L`pwd`/../libtorrent/bin/gcc-5.4.0/release/crypto-openssl/link-static/threading-multi -l:libtorrent.a" \
libtorrent_LIBS="-L`pwd`/../libtorrent/bin/gcc-6.3.0/release/boost-link-static/crypto-openssl/link-static/threading-multi -l:libtorrent.a" \
./configure --disable-gui --disable-qt-dbus
./configure --disable-gui --disable-qt-dbus
sed -i 's/-lboost_system//' conf.pri
sed -i 's/-lboost_system//' conf.pri
make -j$(nproc)
make -j$(nproc)
cd ../..
cd ../..


cp ./work/qBittorrent/src/qbittorrent-nox .
cp ./work/qBittorrent/src/qbittorrent-nox .