Archive:Compile Kodi on Fedora/Red Hat/CentOS: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(completing yum install line)
>Clockfort
(libmysqlclient not found configure error)
Line 32: Line 32:


=== Configure ===
=== Configure ===
 
Just to appease the configure application, you may have to show it where libmysqlclient is.
sudo ln -s /usr/lib/mysql/libmysqlclient.so.16.0.0 /usr/lib/libmysqlclient.so
  cd XBMC/
  cd XBMC/
  ./bootstrap
  ./bootstrap

Revision as of 05:51, 19 February 2010

Merge-arrow.gif
It has been suggested that this article or section be merged into ArchiveHOW-TO compile XBMC for Linux from source code. (Discuss)

Template:GoToParent

This is a tutorial on how to install XBMC on Fedora 8/9/10/11/12 & CentOS 5.2

Checkout from subversion

svn co Template:Svn XBMC

Install Packages

Fedora 8-12

rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

CentOS 5 (32)

rpm -Uvh http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

CentOS 5 (64)

rpm -Uvh http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

Cut & Paste Fun

yum install SDL* glew glew-devel libmad-devel tre tre-devel libogg libogg-devel libvorbis libvorbis-devel boost \
boost-devel bzip2-devel bzip2-libs fribidi* lzo lzo-devel mysql-libs mysql-devel jasper jasper-devel faac faac-devel \
enca enca-devel hal hal-devel hal-libs cmake gperf nasm libXmu-devel fontconfig-devel freetype-devel libXinerama-devel \
pcre-devel gcc-c++ sqlite-devel curl-devel mysql-devel libcdio-devel libmms-devel faad2-devel flac-devel libsmbclient-devel \
libXtst-devel libsamplerate-devel libtiff-devel pulseaudio-libs-devel avahi-devel wavpack-devel libmpeg2-devel libtool \
libmicrohttpd-devel libmodplug-devel


Configure

Just to appease the configure application, you may have to show it where libmysqlclient is.

sudo ln -s /usr/lib/mysql/libmysqlclient.so.16.0.0 /usr/lib/libmysqlclient.so
cd XBMC/
./bootstrap
./configure

With the above installed packages this should go smoothly :)

Build

make

Install

make install

When this completes you are done!

For Fedora 10-12, SELinux will prevent loading of some .so files due to potential security problems. To allow the loading of these files (thats what you probably want), simply open a terminal and as sudo (or as root) execute the following commands:

chcon -t textrel_shlib_t '/usr/local/share/xbmc/system/players/dvdplayer/avutil-50-i486-linux.so'
chcon -t textrel_shlib_t '/usr/local/share/xbmc/system/players/dvdplayer/avcodec-52-i486-linux.so'
chcon -t textrel_shlib_t '/usr/local/share/xbmc/system/players/dvdplayer/avformat-52-i486-linux.so'
chcon -t textrel_shlib_t '/usr/local/share/xbmc/system/players/dvdplayer/swscale-0.6.1-i486-linux.so'


Simply log into Gnome (or KDE) and open up a terminal and type 'xbmc' and it will load.





Fedora Kickstart File

Here is the kickstart file created by Cookieboy that was used to create the Fedora 12 buildslave. You can use this to do a full install with all the required packages to build XBMC from Source. This kickstart file will grab the packages from the Internet. You can modify the kickstart file to grab all the packages it can from the CDROM install and then the Net for the other packages if you would like. Cookieboy created the file with a local fedora repo rsynced down on a local network. This file has been modified to download from the public Internet.

After this kickstart file is used, in the /source folder you will find two scripts. One will download the latest CrystalHD header files to compile against, as well as a simple script to download xbmc trunk to the /source folder. Run those if you wish, and you can edit them to suit your needs. The other thing this file does, is turn on yum-updatesd and has it run every 24 hours to download any system updates so that they can be installed quickly.

To learn more about Kickstart files, visit the link here.


###########################################
### Kickstart file created by Cookieboy ###
### Created Jan 25th 2010               ###
###########################################

install
url --url http://mirrors.xmission.com/fedora/releases/12/Fedora/i386/os/
lang en_US.UTF-8
keyboard us

### Network - DHCP
network --device eth0 --bootproto dhcp

### Network - Static
#network --bootproto=static --ip=10.0.5.25 --netmask=255.255.255.0 --gateway=10.0.5.1 --nameserver=10.0.5.1 --hostname=myxbmc.mylocal.net

#rootpw rootpasshere

firewall --disabled
authconfig --enableshadow --enablemd5
selinux --disabled
timezone America/Denver
bootloader --location=mbr

#################################################
### REQUIRED REPOS FOR THE YUM PACKAGES BELOW ###
#################################################

repo --name=Fedora-Everything --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-12&arch=i386
repo --name=Fedora-Updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f12&arch=i386
repo --name=RPMFusion-Free --mirrorlist=http://mirrors.rpmfusion.org/free/fedora/12/i386
repo --name=RPMFusion-Free-Updates --mirrorlist=http://mirrors.rpmfusion.org/free/fedora/updates/12/i386
repo --name=RPMFusion-NonFree --mirrorlist=http://mirrors.rpmfusion.org/nonfree/fedora/12/i386
repo --name=RPMFusion-NonFree-Updates --mirrorlist=http://mirrors.rpmfusion.org/nonfree/fedora/updates/12/i386


#########################
### ADD THE XBMC USER ###
#########################

user --name=xbmcuser --password=xbmcuserpass

services --disabled=acpid,anacron,atd,bluetooth,cups,firstboot,ip6tables,iptables,mdmonitor,sendmail --enable=yum-updatesd


############################
### HARDDRIVE PARTITIONS ###
############################

#  Uncomment the lines below to auto format your HD...
#clearpart --all --drives=sda
#part /boot --fstype ext4 --size=200
#part swap --size=1024
#part / --fstype ext4 --size=100 --grow


####################
### Yum Packages ###
####################

%packages

@base
@base-x
@development-tools
@xfce-desktop
kernel-devel
kernel-headers
yum-updatesd
subversion
git
gcc-c++
boost-devel
mesa-libGL-devel
glew-devel
libmad-devel
libjpeg-devel
libsamplerate-devel
libogg-devel
libvorbis-devel
freetype-devel
fontconfig-devel
bzip2-devel
fribidi-devel
sqlite-devel
mysql-devel
libpng-devel
pcre-devel
lzo-devel
libcdio-devel
libsmbclient-devel
SDL-devel
SDL_image-devel
SDL_mixer-devel
enca-devel
jasper-devel
libmms-devel
libXt-devel
libXtst-devel
libXmu-devel
libXinerama-devel
libcurl-devel
dbus-devel
hal-devel
pulseaudio-libs-devel
pulseaudio-libs-zeroconf
faac-devel
avahi-devel
ffmpeg-devel
a52dec-devel
libdca-devel
faad2-devel
mpeg2dec-devel
libass-devel
libmpcdec-devel
flac-devel
wavpack-devel
python-devel
cmake
gperf
unzip
make
libtool
flex
bison
libtiff-devel
libvdpau
nasm
libvdpau-devel
lirc
lirc-devel
e2fsprogs-devel
libdvdread-devel
tre-devel
libdvdread
tre
# Added Feb 16 2010
libmodplug-devel
libmodplug

%end

reboot

%post

#####################################################################
### XFCE: create /etc/sysconfig/desktop (needed for installation) ###
#####################################################################

cat > /etc/sysconfig/desktop <<EOF
PREFERRED=/usr/bin/startxfce4
EOF

########################################
### Create Nesessary Changes / Setup ###
########################################

mkdir /source

################################################################
### HERE IS WHERE WE SET UP THE AUTO-LOGIN FOR THE XBMC USER ###
################################################################

cat >> /etc/gdm/custom.conf <<EOF
[daemon]
TimedLoginEnable=true
TimedLogin=xbmcuser
TimedLoginDelay=2
EOF

###############################
### make XBMC user use Xfce ###
###############################

echo "startxfce4" > /home/xbmcuser/.Xclients
chmod a+x /home/xbmcuser/.Xclients
chown xbmcuser:xbmcuser /home/xbmcuser/.Xclients

#############################
### make XBMC dep scripts ###
#############################

#########################
OUTFILE=/source/setup-xbmc-crystalhd.sh
(
cat <<'EOF'
#!/bin/sh
# This script will SVN Export the needed libraries to compile crystalHD in XBMC

### Create folders and export CrystalHD Headers
mkdir -p /usr/local/include/libcrystalhd
svn export --force https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk/lib/libcrystalhd/ /usr/local/include/libcrystalhd/
EOF
) > $OUTFILE

if [ -f "$OUTFILE" ]
then
  chmod +x $OUTFILE
  # Make the generated file executable.
else
  echo "Problem in creating file: \"$OUTFILE\""
fi

###########################
OUTFILE=/source/setup-xbmc-trunk.sh
(
cat <<'EOF'
#!/bin/sh
### Check out SVN Trunk to /source/xbmc

svn co https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk/ /source/xbmc/
EOF
) > $OUTFILE

if [ -f "$OUTFILE" ]
then
  chmod +x $OUTFILE
  # Make the generated file executable.
else
  echo "Problem in creating file: \"$OUTFILE\""
fi
############################


OUTFILE=

######################################################################
### Modify yum-updated to auto download any updates every 24 hours ###
######################################################################

sed -i -e 's/run_interval \= 3600/run_interval \= 86400/' /etc/yum/yum-updatesd.conf
sed -i -e 's/emit_via \= dbus/emit_via \= syslog/' /etc/yum/yum-updatesd.conf
sed -i -e 's/do_update \= no/do_update \= no/' /etc/yum/yum-updatesd.conf
sed -i -e 's/do_download \= no/do_download \= yes/' /etc/yum/yum-updatesd.conf
sed -i -e 's/do_download_deps \= no/do_download_deps \= yes/' /etc/yum/yum-updatesd.conf


%end