1 # Contributor: Brad Fanella <bradfanella@archlinux.us>
2 # Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
3 # Contributor: Zeqadious <zeqadious.at.gmail.dot.com>
4 # Contributor: BlackEagle < ike DOT devolder AT herecura DOT be >
5 # Contributor: uwinkelvos < ulf at winkelvos dot de>
13 pkgdesc="XBMC Media Center"
14 arch=('i686' 'x86_64')
16 license=('GPL' 'custom')
18 provides=('xbmc=$pkgver')
19 depends=( 'bzip2' 'curl' 'enca' 'faac' 'faad2' 'fontconfig' 'fribidi'
20 'glew' 'jasper' 'libcdio' 'libgl' 'libmad' 'libmms'
21 'libmpeg2' 'libmysqlclient' 'libsamplerate' 'libxinerama'
22 'libxrandr' 'libxtst' 'lzo2' 'sdl_image' 'sdl_mixer'
23 'smbclient' 'wavpack' 'mesa-demos' 'xorg-utils' 'libmicrohttpd'
24 'libssh' 'libva' 'libmodplug' 'rtmpdump' 'lsb-release'
26 makedepends=('boost' 'cmake' 'gperf' 'nasm' 'libvdpau' 'unzip' 'zip')
27 optdepends=('lirc: remote controller support'
28 'unrar: access compressed files without unpacking them'
29 'devicekit-power: used to trigger suspend functionality'
30 'udisks: automount external drives'
31 'upower: used to trigger suspend functionality'
32 'libvdpau: for nvidia hardware acceleration'
35 install=("${pkgname}.install")
37 source=("http://mirrors.xbmc.org/releases/source/xbmc-$pkgver.tar.gz"
39 md5sums=('728fb514e5f43f27bb880305061b4e72'
40 'c3e2ab79b9965f1a4a048275d5f222c4')
43 cd "${srcdir}/xbmc-$pkgver"
45 # remove "--as-needed" from LDFLAGS
46 unset LDFLAGS; LDFLAGS="-Wl,--hash-style=gnu"
48 msg "Bootstrapping XBMC"
51 msg "Configuring XBMC"
52 ./configure --prefix=/usr \
58 --disable-external-python \
60 --disable-external-liba52 \
61 --disable-external-libdts \
62 --disable-external-ffmpeg
68 make -C lib/addons/script.module.pil
69 make -C lib/addons/script.module.pysqlite
73 cd "${srcdir}/xbmc-$pkgver"
74 msg "Running make install"
75 make prefix="${pkgdir}${_prefix}" install
77 # Replace FEH.py with FEH.sh (and thus remove external python dependency)
78 install -D -m 0755 "${srcdir}/FEH.sh" "${pkgdir}${_prefix}/share/xbmc/FEH.sh"
79 sed -i -e 's/^python \(.*\)FEH.py \(.*\)$/\1FEH.sh \2/' "${pkgdir}${_prefix}/bin/xbmc"
82 sed -i -e 's/which lsb_release &> \/dev\/null/\[ -f \/etc\/arch-release ]/g' "${pkgdir}${_prefix}/bin/xbmc"
83 sed -i -e "s/lsb_release -a 2> \/dev\/null | sed -e 's\/\^\/ \/'/cat \/etc\/arch-release/g" "${pkgdir}${_prefix}/bin/xbmc"
86 install -D -m 0644 "${srcdir}/xbmc-$pkgver/tools/Linux/xbmc.desktop" "${pkgdir}${_prefix}/share/applications/xbmc.desktop"
87 install -D -m 0644 "${srcdir}/xbmc-$pkgver/tools/Linux/xbmc-48x48.png" "${pkgdir}${_prefix}/share/pixmaps/xbmc.png"
90 install -D -m 0755 "${srcdir}/xbmc-$pkgver/xbmc-xrandr" "${pkgdir}${_prefix}/share/xbmc/xbmc-xrandr"
91 install -D -m 0755 "${srcdir}/xbmc-$pkgver/tools/TexturePacker/TexturePacker" "${pkgdir}${_prefix}/share/xbmc/"
94 install -d -m 0755 "${pkgdir}${_prefix}/share/licenses/${pkgname}"
95 for licensef in LICENSE.GPL copying.txt; do
96 mv "${pkgdir}${_prefix}/share/doc/xbmc/${licensef}" "${pkgdir}${_prefix}/share/licenses/${pkgname}"
100 install -d -m 0755 "${pkgdir}${_prefix}/share/doc/${pkgname}"
103 msg "Cleanup unneeded files"
104 rm -rf "${pkgdir}/usr/share/xsessions"
105 rm -f "${pkgdir}/usr/share/xbmc/FEH.py"
106 rm -f "${pkgdir}/usr/share/icons/hicolor/icon-theme.cache"
109 msg "Stripping binaries"
110 find "$pkgdir" -type f -exec strip {} \; >/dev/null 2>/dev/null