Contents
This guide will show only the required methods / commands to get rTorrent-PS-CH
and pyrocore utilities up and running in tmux within 20 minutes. It's really easy with the help of the amazing build script created by @pyroscope.
Note that building process of rTorrent-PS-CH
has been changed (simplified) as of v1.6.0
, still installing a compiled build into the system in the end is the preferred way.
First, you need to install a few required packages — and no, this is not optional in any way. They require about 300 MB
disk space. These steps must be performed by the root
user (i.e. in a root shell, or by writing sudo
before the actual command):
apt-get update
apt-get install sudo tmux coreutils binutils build-essential subversion git time \
chrpath pkg-config libssl-dev libncurses5-dev libncursesw5-dev locales libcppunit-dev \
zlib1g-dev autoconf automake libtool libxml2-dev libxslt1-dev curl ruby ruby-dev mc \
python python-dev python-virtualenv python-pip python-setuptools python-pkg-resources
gem install fpm
After that all you need is to place a .tmux.conf like that in your home directory (can be root
or a regular user) and you can already run tmux
:
cd ~; curl -sLSO https://raw.githubusercontent.com/chros73/rtorrent-ps-ch_setup/master/ubuntu-14.04/home/chros73/.tmux.conf
tmux -2u
There is only 1 crucial option (along with the other useful ones) in that .tmux.conf
: set -g default-terminal "screen-256color"
. This is responsible for getting 256 color support. No matter what other tutorials / guides / intructions say about the TERM
environment variable: you shouldn't set it! You will experience strange rendering problems! Although this will result that rTorrent-PS-CH
won't start in a terminal window, but that's not a problem since we always run it in tmux
. (Read more about it.)
You can also build the latest CPU optimized version of tmux.
Multiple versions can be supported or just the latest stable git
version. If patches for multiple version can be found inside the patches
directory then build.sh
will compile the latest release version, in this case git
option can be passed to it to build git
version. If only_git_lt_rt
is set to true
in build.sh
script then it will always build git
version.
It has to be compiled first preferebly with a regural user. Build script creates local CPU optimized code by default (+
sign is displayed in the middle of title bar of rTorrent-PS-CH
instead of -
).
It will build rTorrent-PS-CH
binary including some libraries into ~/lib/rtorrent-ps-ch*
directory and create symlinks to it in ~/bin/
and ~/lib/
directories.
mkdir -p ~/src/; cd ~/src/
git clone https://github.com/chros73/rtorrent-ps-ch.git
cd rtorrent-ps-ch
time nice -n 19 ./build.sh ch
You need root access
for this.
It installs (copies) the compiled rtorrent-ps-ch*
directory into /opt/
directory and creates symlinks to it in /usr/local/bin/
, /usr/local/lib/
and /opt/
directories. (More hint about sudo
for Debian.)
sudo ./build.sh install
The build script provides other useful tasks as well.
If you want to turn off optimization for some reason (e.g. packaging the build) it can be done by rebuilding it with:
optimize_build=no time nice -n 19 ./build.sh ch
You can even build an optimized version of vanilla rtorrent
(only including necessary patches if there's any).
It will build the binary including some libraries into ~/lib/rtorrent-ps-ch-vanilla*
directory and create symlink to it in ~/bin/
directory. (Note that installing, packaging a vanilla build is not supported.)
time nice -n 19 ./build.sh vanilla
You can create tarballs
of an optimized/unoptimized/vanilla build from the ~/lib/rtorrent-ps-ch*
build directory if you like:
./build.sh pkg2tgz
You should copy the resulted *.tar.gz
tarball from /tmp/rtorrent-ps-ch-dist
to somewhere safe.
You can even create a package
of an unoptimized (optimize_build=no
), installed build with fpm
if you like (so you can distribute it later):
debfullname="yourname" debemail="youremailaddress" ./build.sh pkg2deb
You should copy the resulted *.deb
package from /tmp/rtorrent-ps-ch-dist
to somewhere safe.
You can also create a package
of an unoptimized (optimize_build=no
), installed build with pacman
(fpm
from the AUR should be used!) if you like (so you can distribute it later):
debfullname="yourname" debemail="youremailaddress" ./build.sh pkg2pacman
You should copy the resulted *.tar.xz
package from /tmp/rtorrent-ps-ch-dist
to somewhere safe.
Check the result by running rtorrent
(you don't need a config file for this) in a tmux
window, not terminal window!
You can delete the ~/src/rtorrent-ps-ch/
directory later if all went well with:
cd ~ && [ -d ~/src/rtorrent-ps-ch/ ] && rm -rf ~/src/rtorrent-ps-ch/
You should run these under your normal user account:
cd ~ && mkdir -p ~/bin ~/.local
git clone "https://github.com/pyroscope/pyrocore.git" ~/.local/pyroscope
~/.local/pyroscope/update-to-head.sh
touch ~/.bash_completion
grep /\.pyroscope/ ~/.bash_completion >/dev/null || \
echo >>.bash_completion ". ~/.pyroscope/bash-completion.default"
. /etc/bash_completion
You can check whether all went well with:
pyroadmin --version
If you want to update pyrocore
utils later:
cd ~/.local && tar -czf pyroscope-$(date +'%Y-%m-%d').tar.gz pyroscope # make backup first
cd ~ && ~/.local/pyroscope/update-to-head.sh # update it
pyroadmin --version # check for success
It's really that simple, it only took about 20 minutes.