Ubuntu – Is mediatomb not compiled with javascript support


I've been using mediatomb for a while and when I've decided to present files and folders in a custom way, I figured out that mediatomb in ubuntu 11.4 (server) was not compiled with javascript.

Has anyone encountered this situation, and find a "simple" (few steps) solution ?

note I tried to compile & repack mediatomb, but one of its dependency libjs is now libmozjs185 API & ABI changed so I aborted.

thanks in advance.

Best Answer

Mediatomb is not compiled with javascript because the repository libraries (libmozjs185) does not support the compilation of SpiderMonkey into MediaTomb.

Looking back - this particular build-receipe has been used since v10.04 (lucid) thus you'll need to repack the Debian MediaTomb packages with Javascript support yourself.

Prereqs for repacking with javascript support

You'll need to "borrow" some older libraries from Debian Sid - and remove the offending libraries if you have them installed i.e.

get libmozjs2d and libmozjs-dev from the debian sid distibution: libmozjs2d_1.9.1.16-6_i386.deb and libmozjs-dev_1.9.1.16-6_i386.deb & install a missing library

sudo apt-get remove libmozjs185*
sudo apt-get install build-essential libnspr4-0d 
sudo dpkg -i libmoz*.deb

Obtain the source

Get the mediatomb source:

sudo apt-get build-dep mediatomb
sudo apt-get source mediatomb

now edit debian/rules to enable javascript

sudo nano <mediatombfolder>/debian/rules

In the debian/rules file, search for MEDIATOMB_CONFIG_OPTIONS and change --disable-libjs to --enable-libjs.

You should also update the changelog file (in the same debian directory) and perhaps the "mediatomb.dsc" file to change the version.

check and repack


cd <mediatombfolder>
sudo ./configure

This should confirm all necessary prerequisites are installed for compilation.


sudo dpkg-buildpackage -rfakeroot -us -uc

If all goes well, you should see 3 new deb files in folder above .

Install them all:

sudo apt-get install libjs-prototype
sudo dpkg -i mediatomb*.deb

based upon source

Related Question