How to Compile Packages on Chrooted Debian

Compiling packages on debian it's quite easy and it's done in 4 stages: download source code, configure, make, install (optionally you can apply patches)

A - For Arm routers, setup Debian from here

B - For Mipsel routers, setup Debian from here

Compile Transmission Torrent Download Manager

1 - Enter chrooted debian with:

debian enter

2 - Update Debian

apt-get update
apt-get upgrade

3 - Install necessary packages

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

3a - Fix checkinstall

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

- Download libevent v2.0.22 source code and compile

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

5 - 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_armel.deb, you can store it in another place for future use or share it with someone else.

 

6 - Download transmission v2.92 source code and compile

cd /var/tmp
wget https://download.transmissionbt.com/files/transmission-2.92.tar.xz
tar xvf transmission-2.92.tar.xz
cd transmission-2.92
./configure --enable-lightweight
make -j 2

7 - 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-1_armel.deb, you can store it in another place for future use or share it with someone else.

 

If you need a startup script and an optimized settings file, get point 7 & 9 from here


Compile Minidlna Upnp Media Server

1 - Enter chrooted debian with:

debian enter

2 - Update Debian

apt-get update
apt-get upgrade

3 - Install necessary packages

apt-get install autopoint autoconf checkinstall gettext libavutil-dev libexif-dev libavcodec-dev libpng12-dev\
libid3tag0-dev libFLAC-dev libvorbis-dev libsqlite3-dev libavformat-dev libffmpegthumbnailer-dev libjpeg-dev

3a - Fix checkinstall

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

- Download minidlna v1.1.5 source code and compile

cd /var/tmp
wget -c -O minidlna-1.1.5.tar.gz https://sourceforge.net/projects/minidlna/files/minidlna/1.1.5/minidlna-1.1.5.tar.gz
tar xvf minidlna-1.1.5.tar.gz
cd minidlna-1.1.5
./autogen.sh
./configure
make -j 2

5 - Run checkinstall and press enter 3 times

checkinstall

The minidlna package has been installed and saved to /var/tmp/minidlna-1.1.5/minidlna_1.1.5-1_armel.deb, you can store it in another place for future use or share it with someone else.

 

If you need startup script and configuration file, use point 6 & 7 from here
Enjoy...

  • Aleksei Tugai

    # echo "deb http://packages.dotdeb.org jessie all" >> /etc/apt/sources.list && echo "deb-src http://packages.dotdeb.org jessie all" >> /etc/apt/sources.list

    • Sorry, I don't understand the question :)

  • TeHashX

    Updated guide for Minidlna v1.1.5 and Transmission v2.92

  • Quiller101

    Hmmmm, trying to install minidlna, but I'm getting install errors in step 3 and 4. Is this tutorial still up to date?

    • TeHashX

      What issues at point 3?
      At point 4 download latest source code from here https://sourceforge.net/projects/minidlna/files/minidlna/1.1.5/minidlna-1.1.5.tar.gz
      The best minidlna is this optware version https://www.hqt.ro/minidlna-media-server-with-thumbnails-through-optware-ng/

      • Quiller101

        in step 4 ./autogen.sh I get the message : configure: error: libavutil headers not found or not usable
        and also at the end: configure.ac:30: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
        configure.ac:30: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
        configure.ac:30: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
        autoreconf: Leaving directory `.'

        and during ./configure, I get the message: configure: error: libavutil headers not found or not usable

        The make command doesn't start at all.

        I managed to get transmission working on debian Jessie, but not minidlna

        • TeHashX

          I updated the guide to compile minidlna 1.1.5 from debian jessie.
          Ignore "The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged" error.
          If you want to start/stop/restart all optware or entware installed services, type in terminal:
          services start
          services stop
          services restart
          :)

          • Quiller101

            Thx for the help. However, while running step 3, I now get the message "E: Unable to locate package libpng12-devlibid3tag0-dev".

            How do I fix that?

          • TeHashX

            I just tested from scratch and worked, which router?
            Copy paste the error on any search provider and you'll find a solution.
            apt install libpng-dev
            ...

          • Quiller101

            I'm running this on the RT-AC88U.

          • TeHashX

            Reinstall debian jessie and follow exact order, repeat point 3 if you need.

          • Quiller101

            Replaced \ with a space in step 3 and the install was a success. My bad for being a linux noob. Thx for the help.

          • TeHashX

            You have to copy both lines, this is the purpose of "\" character

      • Quiller101

        Your second suggestion "https://www.hqt.ro/minidlna-media-server-with-thumbnails-through-optware-ng/" installed just fine and is working. I prefer the debian version though, because it's easier to restart.

  • Tom

    Hi, can you point me how to compile ipkg package (zerotier) for AC56U? I have set up openwrt cross compile enviroment but there's only BCM47XX MIPS Target system. Run in chrooted debian is not possible due to missing access to interfaces and tun/tap.

  • Guest

    No, really want to do so XUPNPD generally worked on the device. And even if you can Adblock on RT68U. Thank you dear friend!

  • Incognito Psytrancer

    Hello friend! Please write a manual on compilation XUPNPD for ARM routers! Thank You!

    • Should be easy, dunno if is available for arm, as I remember only for mipsel and ralink

      • Incognito Psytrancer

        Available for ARM, now there are even sources: http://xupnpd.org/t/download.html
        Thank you for your reply!

        • You need to know just how to compile or a full tutorial with startup script...?

          • Incognito Psytrancer

            No, really want to do so XUPNPD generally worked on the device.
            And even if you can Adblock on RT68U. ))
            Thank you dear friend!

          • Ok, working on xupnpd right now :)

          • Will be available on 26/01/2015 00:01 GMT +2
            3 hours from now :)

SUBSCRIBE

To be notified by email when a new tutorial is posted :)

Thanks for Subscribing! I'll keeping you up-to-date with latest tutorials!

Something went wrong, try again...