updated on Wed Jan 18 08:00:29 UTC 2012
[aur-mirror.git] / xbmc-dharma-pvr-git / PKGBUILD
blob0def4d38499f2d9113f0b1d6507a0206940edc7a
1 # Mantainer: Andremosfet <andrejfet[at]hotmail.it>
2 # Based to DonVla's "xbmc-git" PKBUILD
4 pkgname=xbmc-dharma-pvr-git
5 pkgver=20110522
6 #_commit=94e66f31c62ec0247f0f
7 # 10.0-Dharma release commit
8 #_commit=611667525bf7016c5f3c
9 pkgrel=1
10 pkgdesc="XBMC Media Center with support PVR (VDR,Tvheadend ecc..) - git development version"
11 provides=('xbmc')
12 conflicts=('xbmc' 'xbmc-pulse' 'xbmc-svn' 'xbmc-pvr-testing')
13 replaces=('xbmc-svn')
14 arch=('i686' 'x86_64')
15 url="https://github.com/opdenkamp/xbmc"
16 license=('GPL' 'LGPL')
17 depends=('bzip2' 'faac' 'faad2' 'fribidi' 'glew' 'jasper' 'libass' 'libcdio' 'libgl' 'libmad' 'libmms' 
18          'libmicrohttpd' 'libmodplug' 'libmpeg2' 'libmysqlclient' 'libsamplerate' 'libxrandr' 'libxinerama' 
19          'libxtst' 'lzo2' 'sdl_image>=1.2.10' 'sdl_mixer' 'smbclient' 'unzip' 'wavpack' 'mesa-demos' 'xorg-xdpyinfo')
20 makedepends=('boost' 'cmake' 'git' 'gperf' 'nasm' 'python2' 'zip' 'libvdpau' 'udisks' 'upower' 'unrar')
21 optdepends=('avahi: to use zerconf features (remote, etc...)' 
22             'gdb: for meaningful backtraces in case of trouble - STRONGLY RECOMMENDED' 
23             'libssh: support for sshfs'
24             'libva: accelerated video playback for nvidia, ati/amd and some intel cards'
25             'lirc: remote controller support' 
26             'pulseaudio: pulseaudio support')
27 options=('makeflags')
28 install="${pkgname}.install"
29 source=("FEH.sh") 
30 md5sums=('5c09caddbf02b07c09a05bbaf7894ee6')
32 _gitroot="https://github.com/opdenkamp/xbmc.git"
33 _gitname="xbmc"
34 _prefix=/usr
36 build() {
37     cd "${srcdir}"
38     msg "Connecting to GIT server...."
40     if [ -d ${_gitname} ] ; then
41         cd ${_gitname} && git pull origin
42         msg "The local files are updated."
43         msg "Running make distclean"
44         make distclean || :
45     else
46         git clone ${_gitroot} ${_gitname}
47     fi
49     # Configure XBMC
50     cd "${srcdir}/${_gitname}"
52     # fix lsb_release dependency
53     sed -i -e 's:/usr/bin/lsb_release -d:cat /etc/arch-release:' xbmc/utils/SystemInfo.cpp
55     # remove "--as-needed" from LDFLAGS
56     unset LDFLAGS; LDFLAGS="-Wl,--hash-style=gnu"
58     msg "Bootstrapping XBMC"
59     ./bootstrap
61     msg "Configuring XBMC" 
62         export PYTHON_VERSION=2    
63         ./configure --prefix="${_prefix}" --disable-hal \
64                 --enable-vdpau \
65                 --enable-external-libraries \
66                 --disable-external-ffmpeg \
67                 --enable-debug
69     # Now build
70     msg "Running make" 
71     make ${MAKEFLAGS}
72     make -C lib/addons/script.module.pil
75 package() {
77     cd "${srcdir}/${_gitname}"
78     msg "Running make install" 
79     make prefix="${pkgdir}${_prefix}" install
81 # Replace FEH.py with FEH.sh (and thus remove external python dependency)
82     install -D -m 0755 "${srcdir}/FEH.sh" "${pkgdir}${_prefix}/share/xbmc/FEH.sh"
83     sed -i -e 's/^python \(.*\)FEH.py \(.*\)$/\1FEH.sh \2/' "${pkgdir}${_prefix}/bin/xbmc"
85 # lsb_release fix
86     sed -i -e 's/which lsb_release &> \/dev\/null/\[ -f \/etc\/arch-release ]/g' "${pkgdir}${_prefix}/bin/xbmc"
87     sed -i -e "s/lsb_release -a 2> \/dev\/null | sed -e 's\/\^\/    \/'/cat \/etc\/arch-release/g" "${pkgdir}${_prefix}/bin/xbmc"
89 # .desktop files
90     install -D -m 0644 "${srcdir}/${_gitname}/tools/Linux/xbmc.desktop" "${pkgdir}${_prefix}/share/applications/xbmc.desktop"
91     install -D -m 0644 "${srcdir}/${_gitname}/tools/Linux/xbmc-48x48.png" "${pkgdir}${_prefix}/share/pixmaps/xbmc.png"
93 # Tools
94     install -D -m 0755 "${srcdir}/${_gitname}/xbmc-xrandr" "${pkgdir}${_prefix}/share/xbmc/xbmc-xrandr"
95     install -D -m 0755 "${srcdir}/${_gitname}/tools/TexturePacker/TexturePacker" "${pkgdir}${_prefix}/share/xbmc/"
97 # Licenses
98     install -d -m 0755 "${pkgdir}${_prefix}/share/licenses/${pkgname}" 
99     for licensef in LICENSE.GPL copying.txt; do 
100         mv "${pkgdir}${_prefix}/share/doc/xbmc/${licensef}" "${pkgdir}${_prefix}/share/licenses/${pkgname}" 
101     done 
103 # Docs 
104     install -d -m 0755 "${pkgdir}${_prefix}/share/doc/${pkgname}" 
105     for docsf in keymapping.txt README.linux; do 
106         mv "${pkgdir}${_prefix}/share/doc/xbmc/${docsf}" "${pkgdir}${_prefix}/share/doc/${pkgname}" 
107      done
109 # cleanup some stuff
110     msg "Cleanup unneeded files"
111     rm -rf "${pkgdir}/usr/share/xsessions"
112     rm -f "${pkgdir}/usr/share/xbmc/FEH.py"
113     rm -f "${pkgdir}/usr/share/icons/hicolor/icon-theme.cache"
115 # strip
116     msg "Stripping binaries"
117     find "${pkgdir}" -type f -exec strip {} \; >/dev/null 2>/dev/null