macos编译安装rtorrent

确保安装xcode和brew

安装编译工具和部分依赖

1
$ brew install automake libtool boost curl lzlib libsigc++ openssl xmlrpc-c

编译安装libtorrent

1
2
3
4
5
6
$ git clone https://github.com/rakshasa/libtorrent.git
$ cd libtorrent
$ ./autogen.sh
$ CC=clang CXX=clang++ CXXFLAGS="-Wno-deprecated-declarations -O3 -std=c++11 -stdlib=libc++ -I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib" ./configure
$ make
$ make install

libtorrent安装到/usr/local/lib

编译安装rtorrent

1
2
3
4
5
6
7
$ git clone https://github.com/rakshasa/rtorrent.git
$ cd rtorrent
$ ./autogen.sh
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
$ CC=clang CXX=clang++ CXXFLAGS="-Wno-deprecated-declarations -O3 -std=c++11 -stdlib=libc++ -I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib" ./configure --with-xmlrpc-c
$ make
$ make install

rtorrent安装到/usr/local/bin

运行

1
$ rtorrent

默认配置文件为~/.rtorrent.rc

References:
[1]libtorrent and rtorrent on mac.sh
[2]rTorrent cheatsheet
[3]Navigating