Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- MAIN()
- {
- installDepends
- getSources
- makeOpenSSL
- makeC-ares
- makeCurl
- makeXMLRPC-c
- makeLibTorrent
- makeRTorrent
- }
- function _exitIfFailed()
- {
- if [ $1 -ne 0 ]
- then
- exit -1
- fi
- }
- function installDepends()
- {
- apt-get -y -q install git build-essential automake libtool libcppunit-dev libsigc++-2.0-dev libncurses-dev libxml2-dev pkg-config software-properties-common
- _exitIfFailed $?
- }
- function getSources()
- {
- # Getting Ducks in a row, change versions herer
- git clone git://git.openssl.org/openssl.git
- git clone https://github.com/c-ares/c-ares.git
- git clone https://github.com/curl/curl.git
- git clone https://github.com/mirror/xmlrpc-c
- wget -O - http://rtorrent.net/downloads/libtorrent-0.13.8.tar.gz |tar xz
- mv libtorrent-0.13.8 libtorrent
- wget -O - http://rtorrent.net/downloads/rtorrent-0.9.8.tar.gz| tar zx
- mv rtorrent-0.9.8 rtorrent
- result=$(test -d openssl && test -d c-ares && test -d curl && test -d curl && test -d xmlrpc-c && test -d libtorrent && test -d rtorrent ; echo $? )
- _exitIfFailed $result
- }
- function makeOpenSSL()
- {
- cd openssl
- ./config -fPIC
- make -j2 && make install
- _exitIfFailed $?
- cd ..
- }
- function makeC-ares()
- {
- cd c-ares
- ./buildconf
- ./configure --enable-nonblocking --enable-shared
- make -j2 && make install
- _exitIfFailed $?
- cd ..
- }
- function makeCurl()
- {
- cd curl
- ./buildconf
- ./configure --enable-ares
- make -j2 && make install
- _exitIfFailed $?
- cd ..
- }
- function makeXMLRPC-c()
- {
- cd xmlrpc-c/advanced
- ./configure -disable-wininet-client --disable-libwww-client --enable-abyss-server --disable-cplusplus --disable-abyss-threads --disable-cgi-server --with-libwww-ssl
- make -j2 && make install
- _exitIfFailed $?
- cd ../..
- }
- function makeLibTorrent
- {
- cd libtorrent
- ./autogen.sh
- ./configure --with-posix-fallocate --disable-debug
- make -j2 && make install
- _exitIfFailed $?
- cd ..
- }
- function makeRTorrent()
- {
- cd rtorrent
- ./autogen.sh
- ./configure --disable-debug --with-xmlrpc-c
- make -j2 && make install
- result=$?
- ldconfig
- _exitIfFailed $?
- cd ..
- }
- ### Body
- exec &> >(tee -a BUILD_LOG.$$)
- mkdir ~/WorkingDirectory
- cd ~/WorkingDirectory
- MAIN
- rtorrent -h |grep version
- ldd /usr/local/bin/rtorrent
- echo "Complete"
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement