I wanted to run miniDLNA on my virtual CentOS machine. Unfortunately, not all the dependencies for it are very available on yum repos, so I decided to install everything from scratch. I found this very good howto but it didn’t do everything how I wanted it (I want it installed globally, not in my homedir) and it didn’t include everything I needed (lame and opencore-amr), so I created my own version. Here it is:

yum -y install freetype-devel giflib gsm gsm-devel imlib2 imlib2-devel lame lame-devel libICE-devel libSM-devel libX11-devel
yum -y install libXau-devel libXdmcp-devel libXext-devel libXrandr-devel libXrender-devel libXt-devel
yum -y install libogg libvorbis vorbis-tools mesa-libGL-devel mesa-libGLU-devel xorg-x11-proto-devel zlib-devel
yum -y install libtheora theora-tools
yum -y install ncurses-devel
yum -y install libdc1394 libdc1394-devel


cd /opt
wget http://downloads.xvid.org/downloads/xvidcore-1.3.4.tar.gz
tar xzvf xvidcore-1.3.4.tar.gz
cd xvidcore/build/generic
./configure
make
make install

cd /opt
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz
tar xzvf libogg-1.3.2.tar.gz
cd libogg-1.3.2
./configure
make
make install

cd /opt
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.gz
tar xzvf libvorbis-1.3.5.tar.gz
cd libvorbis-1.3.5
./configure --with-ogg
make
make install

cd /opt
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
tar xzvf libtheora-1.1.1.tar.gz
cd libtheora-1.1.1
./configure --with-ogg --disable-examples --disable-sdltest --disable-vorbistest --enable-shared --enable-pic --with-pic
make
make install

cd /opt
wget http://downloads.sourceforge.net/opencore-amr/vo-aacenc-0.1.3.tar.gz
tar xzvf vo-aacenc-0.1.3.tar.gz
cd vo-aacenc-0.1.3
./configure 
make
make install

cd /opt
wget http://downloads.sourceforge.net/opencore-amr/opencore-amr-0.1.3.tar.gz
tar xzvf opencore-amr-0.1.3.tar.gz
cd opencore-amr-0.1.3
./configure 
make
make install

yum remove yasm
cd /opt
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar xzfv yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure 
make
make install

cd /opt
git clone https://chromium.googlesource.com/webm/libvpx.git
cd libvpx
./configure --disable-examples --enable-shared --enable-pic
make
make install

cd /opt
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-static --enable-shared --enable-pic
make
make install

cd /opt
wget http://downloads.sourceforge.net/lame/lame-3.99.5.tar.gz
tar xzfv lame-3.99.5.tar.gz
cd lame-3.99.5
./configure 
make
make install

echo /usr/local/lib >> /etc/ld.so.conf.d/custom-libs.conf
ldconfig

cd /opt
git clone git://source.ffmpeg.org/ffmpeg.git
cd /opt/ffmpeg
git checkout release/3.0
./configure --prefix=/usr --extra-libs=-ldl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads --enable-shared --enable-libgsm --enable-libdc1394 --disable-stripping
make
make install

cd /opt
wget http://downloads.sourceforge.net/minidlna/1.1.5/minidlna-1.1.5.tar.gz
tar xzfv minidlna-1.1.5.tar.gz
cd minidlna-1.1.5
./configure 
make
make install