1 # Mantainer: Andremosfet <andrejfet[at]hotmail.it>
2 # Based to DonVla's "xbmc-git" PKBUILD
4 pkgname=xbmc-dharma-pvr-git
6 #_commit=94e66f31c62ec0247f0f
7 # 10.0-Dharma release commit
8 #_commit=611667525bf7016c5f3c
10 pkgdesc="XBMC Media Center with support PVR (VDR,Tvheadend ecc..) - git development version"
12 conflicts=('xbmc' 'xbmc-pulse' 'xbmc-svn' 'xbmc-pvr-testing')
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')
28 install="${pkgname}.install"
30 md5sums=('5c09caddbf02b07c09a05bbaf7894ee6')
32 _gitroot="https://github.com/opdenkamp/xbmc.git"
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"
46 git clone ${_gitroot} ${_gitname}
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"
61 msg "Configuring XBMC"
62 export PYTHON_VERSION=2
63 ./configure --prefix="${_prefix}" --disable-hal \
65 --enable-external-libraries \
66 --disable-external-ffmpeg \
72 make -C lib/addons/script.module.pil
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"
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"
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"
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/"
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}"
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}"
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"
116 msg "Stripping binaries"
117 find "${pkgdir}" -type f -exec strip {} \; >/dev/null 2>/dev/null