1 # Contributor:Andremosfet <andrejfet at hotmail dot it>
3 pkgname=xbmc-pvr-testing
6 pkgdesc="XBMC Media Center with PVR support (VDR ecc..)"
8 url="https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/pvr-testing2/"
10 depends=('bzip2' 'faac' 'faad2' 'fribidi' 'glew' 'jasper' 'libass' 'libcdio' 'libgl' 'libmad'
11 'libmicrohttpd-xbmc' 'libmms' 'libmodplug' 'libmpeg2' 'libmysqlclient' 'libsamplerate' 'libxinerama'
12 'libvpx' 'libxtst' 'lzo2' 'sdl_image>=1.2.10' 'sdl_mixer' 'smbclient' 'unzip' 'wavpack'
13 'libva' 'libssh' 'udisks' 'upower' 'libvdpau' 'unrar' 'avahi' 'lsb-release'
15 makedepends=('cvs' 'boost' 'cmake' 'gperf' 'nasm' 'subversion' 'zip' 'python2')
16 optdepends=('gdb: for meaningful backtraces in case of trouble - STRONGLY RECOMMENDED'
17 'lirc: remote controller support')
19 conflicts=('xbmc' 'xbmc-crystalhd' 'xbmc-trunk')
20 install=("${pkgname}.install")
22 md5sums=('c3e2ab79b9965f1a4a048275d5f222c4')
30 _svntrunk=https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/pvr-testing2/
32 if [ -d "$_svnmod/.svn" ]; then
33 msg "SVN tree found, reverting changes and updating to -r$pkgver"
34 (cd "$_svnmod" && svn revert -R . && (make distclean || :); svn up -r "$pkgver")
36 msg "Checking out SVN tree of -r$pkgver"
37 svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
42 # Note on external-libs:
43 # - We cannot use external python because Arch's python was built with
44 # UCS2 unicode support, whereas xbmc expects UCS4 support
45 cd "${srcdir}/${_svnmod}"
47 # Archlinux Branding by SVN_REV
48 export SVN_REV="${pkgver}-ARCH"
49 # fix lsb_release dependency
50 sed -i -e 's:/usr/bin/lsb_release -d:cat /etc/arch-release:' xbmc/utils/SystemInfo.cpp
52 # remove "--as-needed" from LDFLAGS
53 unset LDFLAGS; LDFLAGS="-Wl,--hash-style=gnu"
55 msg "Bootstrapping XBMC"
58 msg "Configuring XBMC"
59 ./configure --prefix="${_prefix}" --disable-hal \
65 --disable-external-libraries \
66 --disable-external-ffmpeg \
67 --disable-external-python || return 1
73 make -C lib/addons/script.module.pil
74 make -C lib/addons/script.module.pysqlite
79 cd "${srcdir}/${_svnmod}"
80 msg "Running make install"
81 make prefix="${pkgdir}${_prefix}" install
83 # Replace FEH.py with FEH.sh (and thus remove external python dependency)
84 install -D -m 0755 "${srcdir}/FEH.sh" "${pkgdir}${_prefix}/share/xbmc/FEH.sh"
85 sed -i -e 's/^python \(.*\)FEH.py \(.*\)$/\1FEH.sh \2/' "${pkgdir}${_prefix}/bin/xbmc"
88 sed -i -e 's/which lsb_release &> \/dev\/null/\[ -f \/etc\/arch-release ]/g' "${pkgdir}${_prefix}/bin/xbmc"
89 sed -i -e "s/lsb_release -a 2> \/dev\/null | sed -e 's\/\^\/ \/'/cat \/etc\/arch-release/g" "${pkgdir}${_prefix}/bin/xbmc"
92 install -D -m 0644 "${srcdir}/${_svnmod}/tools/Linux/xbmc.desktop" "${pkgdir}${_prefix}/share/applications/xbmc.desktop"
93 install -D -m 0644 "${srcdir}/${_svnmod}/tools/Linux/xbmc-48x48.png" "${pkgdir}${_prefix}/share/pixmaps/xbmc.png"
96 install -D -m 0755 "${srcdir}/${_svnmod}/xbmc-xrandr" "${pkgdir}${_prefix}/share/xbmc/xbmc-xrandr"
97 install -D -m 0755 "${srcdir}/${_svnmod}/tools/TexturePacker/TexturePacker" "${pkgdir}${_prefix}/share/xbmc/"
100 install -d -m 0755 "${pkgdir}${_prefix}/share/licenses/${pkgname}"
101 for licensef in LICENSE.GPL copying.txt; do
102 mv "${pkgdir}${_prefix}/share/doc/xbmc/${licensef}" "${pkgdir}${_prefix}/share/licenses/${pkgname}"
106 install -d -m 0755 "${pkgdir}${_prefix}/share/doc/${pkgname}"
107 for docsf in keymapping.txt README.linux; do
108 mv "${pkgdir}${_prefix}/share/doc/xbmc/${docsf}" "${pkgdir}${_prefix}/share/doc/${pkgname}"
112 msg "Cleanup unneeded files"
113 rm -rf "${pkgdir}/usr/share/xsessions"
114 rm -f "${pkgdir}/usr/share/xbmc/FEH.py"
115 rm -f "${pkgdir}/usr/share/icons/hicolor/icon-theme.cache"
118 msg "Stripping binaries"
119 find "$pkgdir" -type f -exec strip {} \; >/dev/null 2>/dev/null