Compile And Install Latest Transmission Version Through Debian

Transmission is a file sharing program.

When you run a torrent, its data will be made available to others by means of upload.

Any content you share is your sole responsibility.

1 - Flash Rmerlin firmware from here

2a - Install Optware-NG from here

or

2b - Install Entware-NG from here

3a - For Arm routers setup Debian Jessie from here (remove transmission if is installed: from optware with ipkg remove transmission, from entware with opkg remove transmission)

or

3b - For Mipsel routers setup Debian Wheezy from here (remove transmission if is installed: from optware with ipkg remove transmission, from entware with opkg remove transmission)

4 - Enter chrooted debian with:

debian enter

5 - Update Debian

apt update && apt upgrade

6 - Install necessary packages

apt install wget libcurl4-openssl-dev libevent-dev ca-certificates \
libssl-dev pkg-config build-essential checkinstall intltool

- Download libevent v2.0.22 source code and compile

cd /var/tmp
wget https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
tar xvf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure
make -j 2

8 - Run checkinstall, press enter, enter, type 2 and name it libevent, type 3 and give it version 2.0.22, now press enter again

checkinstall

The libevent package has been installed and saved to /var/tmp/libevent-2.0.22-stable/libevent_2.0.22-1.deb, you can store it in another place for future use or share it with someone else.

8b - If you get "Installation failed. Aborting package creation", disable translation and run checkinstall again

sed -i 's/TRANSLATE=1/TRANSLATE=0/g' "/etc/checkinstallrc"

9 - Download and install transmission v2.92+ latest source code

cd /var/tmp
wget https://build.transmissionbt.com/job/trunk-linux/9305/artifact/transmission-master-rc8696df516.tar.xz
tar xvf transmission-master-rc8696df516.tar.xz
cd transmission-2.92+
./configure --enable-lightweight
make -j 2

10 - Run checkinstall and press enter 3 times

checkinstall

The transmission package has been installed and saved to /var/tmp/transmission-2.92+/transmission_2.92+.deb, you can store it in another place for future use or share it with someone else.

10b - If you get "Installation failed. Aborting package creation", disable translation and run checkinstall again

sed -i 's/TRANSLATE=1/TRANSLATE=0/g' "/etc/checkinstallrc"

11 - Download startup script

wget -c -O /etc/init.d/S95transmission-debian http://bit.ly/2xZTdk3
chmod 755 /etc/init.d/S95transmission-debian

12 - Start and stop transmission to create path

/etc/init.d/S95transmission-debian start
/etc/init.d/S95transmission-debian stop

13 - Backup and replace settings file with optimised one

mv /etc/transmission-daemon/settings.json /etc/transmission-daemon/settings.json.backup
wget -c -O /etc/transmission-daemon/settings.json http://bit.ly/2xWdiIg

14 - Start transmission

/etc/init.d/S95transmission-debian start

15 - Go to default router ip address 192.168.1.1:9091 username admin, password admin, you can change this by editing /etc/transmission-daemon/settings.json file but be sure transmission is stopped before making changes.

16 - To create startup script we need to stop transmission, and exit debian

/etc/init.d/S95transmission-debian stop
exit

17 - Add transmission to chroted services list

echo "" >>/opt/etc/chroot-services.list
echo "S95transmission-debian" >>/opt/etc/chroot-services.list
chmod 755 /opt/etc/chroot-services.list

18 - Create init-start script for some memory tweaks as suggested by ryzhov_al

nano /jffs/scripts/init-start

#!/bin/sh
echo 524288 > /proc/sys/net/core/rmem_max
echo 524288 > /proc/sys/net/core/wmem_max
echo 8192 > /proc/sys/vm/min_free_kbytes

Save with CTRL-O, press ENTER and exit nano with CTRL-X

Make scripts executable

chmod a+rx /jffs/scripts/*

19 - Start transmission from outside debian together with mounted external folder

debian restart

Enjoy...