Some development packages need to be installed for MPlayer to compile.
up2date xorg-x11-devel
up2date glibc-devel
up2date gtk+-devel
up2date libpng-devel.
Run the configure script and compile. Verify in the output that the installed plugins are enabled. Make sure you run the script with the
correct options or else we won't have a GUI, or multiple CPU support!
./configure --enable-gui --enable-runtime-cpudetection
make
sudo make install
Download a font set for subtitles and extract to
/usr/local/share/mplayer/font/.
Download a skin for MPlayer and extract in
/usr/local/share/mplayer/Skin/. You need to create a symlink to the default skin(when RPMed
this link will be lost, so make sure you add it to the spec file as well):
cd /usr/local/share/mplayer/Skin/
ln -s Skin_Name_Here default
MPlayer should be installed correctly now. Running 'gmplayer' will show the GUI.
The binary executable is /usr/local/bin/mplayer. This file should be packaged, as well as the /usr/local/share/mplayer and /usr/local/lib/codecs directories.
In the %post section of the specfile, some extra lines are added:
# set up link for gmplayer ln -s /usr/local/bin/mplayer /usr/local/bin/gmplayer # set default skin ln -s /usr/local/share/mplayer/Skin/Corelian /usr/local/share/mplayer/Skin/default # fix display setting problem cp /etc/rc.d/rc.local /etc/rc.local.old echo 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' >> /etc/rc.d/rc.local echo 1024 > /proc/sys/dev/rtc/max-user-freq