PKGBUILDs/alarm/xbmc-cubox-git/PKGBUILD

192 lines
6.7 KiB
Bash
Raw Normal View History

2012-11-07 00:28:57 +00:00
buildarch=4
pkgname="xbmc-cubox-git"
pkgver=20121106
pkgrel=1
pkgdesc="A software media player and entertainment hub for digital media"
arch=("armv7h")
url="http://xbmc.org"
license=("GPL" "LGPL")
depends=("faac" "faad2" "jasper" "hicolor-icon-theme" "libass" "libcdio" \
"libgl" "libmad" "libmicrohttpd" "libplist" "libmodplug" "libmpeg2" \
"libmysqlclient" "libsamplerate" "libxtst" "lzo2" "python2" \
"sdl_image>=1.2.10" "sdl_mixer" "smbclient" "unzip" "wavpack" "mesa-demos" \
"xorg-xdpyinfo" "yajl" "glew" "tinyxml" "marvell-libgfx" "marvell-ipp" \
"avahi" "bluez" "libssh" "ffmpeg" "taglib>=1.8" "libnfs" "libdvdcss" \
"libbluray" "libdvdread" "libcec-cubox")
makedepends=("boost" "cmake" "git" "gperf" "nasm" "zip" "swig" "java-runtime")
optdepends=("pulseaudio: pulseaudio support" \
"lirc: remote controller support" \
"udisks: automount external drives" \
"upower: used to trigger suspend functionality" \
"unrar: access compressed files without unpacking them" \
"xorg-xinit: autostart xbmc")
conflict=("xbmc" "xbmc-git")
provides=("xbmc" "xbmc-git")
replaces=("marvell-xbmc-git")
source=("https://dl.dropbox.com/u/38673799/XbmcCuBoxPatches-Rev10.tar.xz" \
"http://alunamation.com/archlinux/arm/AdditionalXbmcCuBoxPatches-Rev10.1.tar.xz" \
"xbmc.service" \
"xbmc.install" \
"https://archvdr.svn.sourceforge.net/svnroot/archvdr/trunk/archvdr/xbmc-git/pulse_fix.patch")
md5sums=("55813f68e1ab05405451f9791e59e68b" \
"966deb0b02155153d72445b461b3e952" \
"f5d227faaac16d08035e0dc849649cb5" \
"46db2069b75b23809bd7c760650618dd" \
"b09721b962e591abb3f4b39a641ded15")
install="xbmc.install"
_gitroot="git://github.com/xbmc/xbmc.git"
_gitname="xbmc"
_prefix=/usr
_patches=(
"Xbmc-git-Python-2.7-2.patch" \
"Lircmap_xml.patch" \
"Xbmc-git-force-vdpau.patch" \
"Xbmc-git-force-vdpau-2.patch" \
"Xbmc-git-UDisksProvider-iso9660.patch" \
"Xbmc-git-libmpeg2-vdpau-vertical-green-bars-fix.patch" \
"01-Xbmc-Add-Marvell-Dove.patch" \
"02.1-Xbmc-MathUtils_h-TARGET_MARVELL_DOVE-20120809.patch" \
"03-Xbmc-Add-VMETA-Codec-20120927.patch" \
"04-Xbmc-Add-Dove-Overlay-20120912.patch" \
"05-Xbmc-VMeta-Fixups.patch" \
"06-Xbmc-Configure-platform-Marvell-Dove-20120925.patch" \
"07-Xbmc-libsquish-arm-20120925.patch" \
# "09-Xbmc-WinSystemGLES_cpp.patch" \
"10-Xbmc-ManageDisplayDove.patch" \
"11-Xbmc-Marvell-use-Pulse.patch" \
"12-Xbmc-Marvell-Dove-cortex-a9.patch" \
"13-Xbmc-Marvell-Dove-force-iwmmxt.patch" \
"14-Xbmc-Marvell-Dove-force-iwmmxt-2.patch" \
"15-Xbmc-Marvell-Dove-enable-armv5te.patch" \
"Xbmc-git-PulseAudio-Updates-20120926.patch" \
"41-Xbmc-VMETA-Updates-2.patch" \
"36-Xbmc-VMETA-use-ffmpeg-for-thumbs.patch" \
"Xbmc-git-CJobWorker-THREAD_PRIORITY_LOWEST.patch" \
"Xbmc-git-pthread-SetThreadInfo-20120806.patch" \
"Xbmc-git-linux-Thread-Name-20120806.patch" \
"xbmc-frodo-433f681-811.12-smoother-page-flip.patch" \
"xbmc-frodo-433f681-811.13-change-email-address.patch" \
"Xbmc-git-JobManager-Force-exit-after-2.patch" \
"Xbmc-git-AnnouncementManager-Locks.patch" \
"34-Xbmc-Dove-Gpu-Backoff-20120818.patch" \
"38-Xbmc-RenderManager.patch" \
"Xbmc-projectM-selectPreset-avoid-abort.patch" \
"Xbmc-git-Thread-StopThread-20120809.patch" \
"Xbmc-git-DVDPlayer-StopThread.patch" \
"Xbmc-git-CDVDAudio-Drain.patch" \
"Xbmc-git-VideoReferenceClock-NvidiaWrapper.patch" \
"Xbmc-git-WinSystemX11-SDL_CreateRGBSurfaceFrom-20120817.patch" \
"Xbmc-git-WinSystemX11-SDL_CreateRGBSurfaceFrom-no-Dove.patch" \
"XbmcPvr-PvrManager-StopUpdateThread.patch" \
"Xbmc-git-BandwidthRequester-20120723.patch" \
"Xbmc-git-enable-systemd-power-management.patch" \
"Xbmc-git-enable-systemd-power-management-2.patch" \
# "Xbmc-git-arm-linux.patch" \
# "Xbmc-git-VMETA-TimeStamp.patch" \
# "Xbmc-git-VMETA-No-Prebuf.patch" \
"Xbmc-git-LinuxTimezone-systemd.patch" \
"Xbmc-git-DoveOverlay-20120806.patch" \
"Xbmc-git-Event-Constructor.patch" \
"Xbmc-git-EventGroup-Constructor.patch" \
"Xbmc-git-Thread-Constructor.patch" \
"Xbmc-git-FileCache-Constructor.patch" \
"Xbmc-git-FileCache-Constructor-2.patch" \
"Xbmc-git-Database-Constructor.patch" \
"Xbmc-git-Event-groupListMutex-SharedSection.patch" \
"Xbmc-git-RecursiveMutex.patch" \
"Xbmc-git-PrintStackSize.patch" \
# "Xbmc-git-no-WinEGLPlatformAndroid-20120926.patch" \
"Xbmc-git-TexturePacker-Makefile.patch" \
"Xbmc-git-dove-dont-specify-audio.patch" \
"Xbmc-git-Repository-checksum-segfault-20120927.patch" \
"Xbmc-git-DVDStreamInfo-cap-channels-at-8.patch" \
"Xbmc-git-DVDAudioCodecFFmpeg-Constructor-20120906.patch" \
"Xbmc-git-SDL_PollEvent.patch" \
# "Xbmc-git-no-error-without-java.patch" \
# "08-Xbmc-WinbindingEGL_cpp.patch" \
# "XbmcPvr-git-debug-tvheadend.patch" \
# "XbmcPvr-git-HTSPDemux-GetSignalStatus-20120906.patch" \
# "XbmcPvr-git-pvr-addons-DESTDIR.patch" \
# "37-Xbmc-debug-BitstreamConverter.patch" \
)
build() {
msg "Connecting to GIT server..."
if [ -d $_gitname ]; then
cd "${_gitname}"
git clean -dxf
git reset --hard
git pull origin
else
git clone --depth 1 "${_gitroot}" "${_gitname}"
cd "${_gitname}"
fi
msg2 "checkout done or server timeout"
# fix lsb_release dependency
sed -i -e "s:/usr/bin/lsb_release -d:cat /etc/arch-release:" xbmc/utils/SystemInfo.cpp
msg "Applying patchs"
for _patch in ${_patches[@]}; do
patch -p1 -i "${srcdir}/XbmcCuBoxPatches-Rev10/${_patch}"
done
for _patch in "${srcdir}"/AdditionalXbmcCuBoxPatches-Rev10.1/* "${srcdir}/pulse_fix.patch"; do
patch -p1 -i "${_patch}"
done
sed -i -e "s/softfp/hard/g" configure.in
msg "Bootstrapping"
./bootstrap
msg "Configuring"
export PYTHON_VERSION=2
./configure --prefix="${_prefix}" \
--with-platform=marvell-dove \
--enable-external-libraries \
--enable-gles \
--enable-pulse \
--disable-debug \
--disable-vaapi \
--disable-hal
msg "make"
make
}
package() {
cd "${srcdir}/${_gitname}"
# Running make install
make DESTDIR="${pkgdir}" install
# run feh with python2
sed -i -e "s/python/python2/g" ${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"
# Tools
install -D -m 0755 "${srcdir}/${_gitname}/xbmc-xrandr" "${pkgdir}/${_prefix}/share/xbmc/xbmc-xrandr"
install -D -m 0755 "${srcdir}/${_gitname}/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
# systemd stuff
install -Dm0644 "${srcdir}/xbmc.service" \
"${pkgdir}/usr/lib/systemd/system/xbmc.service"
}
# vim:set noet: