# # Chakra Packages for Chakra, part of chakra-project.org # # maintainer (i686): Phil Miller # maintainer (x86_64): Manuel Tortosa # python dependency or not _ext_python="disable" _prefix=/usr pkgname=xbmc pkgver=10.1 pkgrel=8 pkgdesc="XBMC Media Center" arch=('i686' 'x86_64') url="http://xbmc.org" license=('GPL' 'custom') depends=( 'bzip2' 'curl' 'enca' 'faac' 'faad2' 'fontconfig' 'fribidi' 'glew' 'jasper' 'libcdio' 'libgl' 'libmad' 'libmms' 'libmpeg2' 'libmysqlclient' 'libsamplerate' 'libxinerama' 'libxrandr' 'libxtst' 'lzo2' 'sdl_image' 'sdl_mixer' 'smbclient' 'wavpack' 'mesa-demos' 'xorg-utils' 'libmicrohttpd' 'libssh' 'libva' 'libmodplug' 'rtmpdump' 'lsb-release' 'sqlite3') if [ "$_ext_python" != "disable" ]; then depends=( '${depends[@]}' 'python2' ) fi makedepends=('boost' 'cmake' 'gperf' 'nasm' 'libvdpau' 'unzip' 'zip' 'cvs') optdepends=('lirc: remote controller support' 'unrar: access compressed files without unpacking them' 'udisks: automount external drives' 'upower: used to trigger suspend functionality' 'libvdpau: for nvidia hardware acceleration' 'lcms' 'tk') install=("${pkgname}.install") options=(makeflags) source=("http://mirrors.xbmc.org/releases/source/xbmc-$pkgver.tar.gz" "FEH.sh" xbmc-10.1-gcc-4.6.patch http://trac.xbmc.org/raw-attachment/ticket/11584/xbmcplugin_int_format.patch) md5sums=('391398126cb86a4f6fbd0b7037997d84' 'c3e2ab79b9965f1a4a048275d5f222c4' '16479d228f81cca4dc32146f1efc1838' 'f42aa74a982ca854491a74e960f13804') build() { cd "${srcdir}/xbmc-$pkgver" patch -p1 <$srcdir/xbmc-10.1-gcc-4.6.patch (cd xbmc/lib/libPython/xbmcmodule && patch -p5 <$srcdir/xbmcplugin_int_format.patch) pacman -Q libass && { msg "Remove libass"; return 1; } # remove "--as-needed" from LDFLAGS unset LDFLAGS; LDFLAGS="-Wl,--hash-style=gnu" msg "Bootstrapping XBMC" ./bootstrap msg "Configuring XBMC" ./configure --prefix=/usr \ --enable-vdpau \ --disable-pulse \ --disable-hal \ --disable-avahi \ --disable-external-liba52 \ --disable-external-libdts \ --enable-external-libmpeg2 \ --enable-external-libogg \ --enable-external-libwavpack \ --disable-external-libass \ --disable-external-ffmpeg \ --enable-rtmp \ --disable-external-python \ --disable-debug # Now (finally) build msg "Running make" make ${MAKEFLAGS} make -C lib/addons/script.module.pil make -C lib/addons/script.module.pysqlite } package() { cd "${srcdir}/xbmc-$pkgver" msg "Running make install" make prefix="${pkgdir}${_prefix}" install # Replace FEH.py with FEH.sh (and thus remove external python dependency) install -D -m 0755 "${srcdir}/FEH.sh" "${pkgdir}${_prefix}/share/xbmc/FEH.sh" sed -i -e 's/^python \(.*\)FEH.py \(.*\)$/\1FEH.sh \2/' "${pkgdir}${_prefix}/bin/xbmc" # lsb_release fix sed -i -e 's/which lsb_release &> \/dev\/null/\[ -f \/etc\/arch-release ]/g' "${pkgdir}${_prefix}/bin/xbmc" sed -i -e "s/lsb_release -a 2> \/dev\/null | sed -e 's\/\^\/ \/'/cat \/etc\/arch-release/g" "${pkgdir}${_prefix}/bin/xbmc" # .desktop files install -D -m 0644 "${srcdir}/xbmc-$pkgver/tools/Linux/xbmc.desktop" "${pkgdir}${_prefix}/share/applications/xbmc.desktop" install -D -m 0644 "${srcdir}/xbmc-$pkgver/tools/Linux/xbmc-48x48.png" "${pkgdir}${_prefix}/share/pixmaps/xbmc.png" # Tools install -D -m 0755 "${srcdir}/xbmc-$pkgver/xbmc-xrandr" "${pkgdir}${_prefix}/share/xbmc/xbmc-xrandr" install -D -m 0755 "${srcdir}/xbmc-$pkgver/tools/TexturePacker/TexturePacker" "${pkgdir}${_prefix}/share/xbmc/" # Licenses install -d -m 0755 "${pkgdir}${_prefix}/share/licenses/${pkgname}" for licensef in LICENSE.GPL copying.txt; do mv "${pkgdir}${_prefix}/share/doc/xbmc/${licensef}" "${pkgdir}${_prefix}/share/licenses/${pkgname}" done # Docs install -d -m 0755 "${pkgdir}${_prefix}/share/doc/${pkgname}" # cleanup some stuff msg "Cleanup unneeded files" rm -rf "${pkgdir}/usr/share/xsessions" rm -f "${pkgdir}/usr/share/xbmc/FEH.py" rm -f "${pkgdir}/usr/share/icons/hicolor/icon-theme.cache" }