2012-09-20 14:27:56 +00:00
|
|
|
# Contributor tomasgroth at yahoo.dk
|
|
|
|
# Contributor WarheadsSE <max@warheads.net>
|
2013-06-12 04:52:38 +00:00
|
|
|
|
2012-09-20 14:27:56 +00:00
|
|
|
buildarch=16
|
|
|
|
|
2013-06-12 04:52:38 +00:00
|
|
|
pkgname=xbmc-rbp-git
|
2014-07-15 10:35:31 +00:00
|
|
|
pkgver=14.20140715
|
2014-07-13 05:09:52 +00:00
|
|
|
pkgrel=1
|
2012-09-20 14:27:56 +00:00
|
|
|
pkgdesc="A software media player and entertainment hub for digital media for the Raspberry Pi"
|
|
|
|
arch=('armv6h')
|
|
|
|
url="http://xbmc.org"
|
|
|
|
license=('GPL' 'custom')
|
2014-07-15 10:35:31 +00:00
|
|
|
depends=('hicolor-icon-theme' 'fribidi' 'lzo2' 'smbclient' 'libtiff' 'libva' 'libpng' 'libcdio' 'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd' 'sdl_image' 'python2' 'libass' 'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'xorg-xdpyinfo' 'libbluray' 'libnfs' 'afpfs-ng' 'avahi' 'bluez-libs' 'tinyxml' 'raspberrypi-firmware' 'libcec' 'libplist' 'swig' 'taglib' 'libxslt' 'shairplay-git')
|
2013-06-08 18:05:56 +00:00
|
|
|
makedepends=('boost' 'cmake' 'gperf' 'nasm' 'zip' 'udisks' 'upower' 'git' 'autoconf' 'java-environment')
|
2012-09-20 14:27:56 +00:00
|
|
|
optdepends=(
|
|
|
|
'lirc: remote controller support'
|
|
|
|
'udisks: automount external drives'
|
2014-01-28 10:08:26 +00:00
|
|
|
'upower: used to trigger power management functionality'
|
2013-11-26 09:41:13 +00:00
|
|
|
'unrar: access compressed files without unpacking them')
|
2013-11-24 12:38:29 +00:00
|
|
|
|
2013-02-02 08:59:56 +00:00
|
|
|
provides=("xbmc")
|
|
|
|
conflicts=("xbmc")
|
2013-02-03 09:55:23 +00:00
|
|
|
install="xbmc.install"
|
2013-12-26 15:41:13 +00:00
|
|
|
source=('xbmc.service'
|
2014-07-13 05:09:52 +00:00
|
|
|
'polkit.rules'
|
|
|
|
'fix_libnfs.patch')
|
2014-01-24 22:44:10 +00:00
|
|
|
|
2013-12-27 11:41:08 +00:00
|
|
|
md5sums=('55e6d3aab86e810c49a7f550be5b7f69'
|
2014-07-13 05:09:52 +00:00
|
|
|
'02f7951824ee13103344f36009c0ef2a'
|
|
|
|
'1086fdb02b838f0a5763e493bed59fc2')
|
2013-06-12 04:52:38 +00:00
|
|
|
|
|
|
|
_gitname="xbmc"
|
|
|
|
_gitroot="git://github.com/xbmc"
|
2014-06-07 19:29:17 +00:00
|
|
|
|
|
|
|
# Only change _gitbranch if master has moved on to the next release number
|
|
|
|
# but there's hasn't been a stable release yet.
|
|
|
|
_gitbranch="master"
|
2012-09-20 14:27:56 +00:00
|
|
|
|
|
|
|
_prefix=/usr
|
|
|
|
|
2013-04-08 18:51:48 +00:00
|
|
|
prepare() {
|
2013-06-12 04:52:38 +00:00
|
|
|
cd "${srcdir}"
|
|
|
|
|
|
|
|
|
|
|
|
msg2 "Connecting to GIT server..."
|
|
|
|
|
|
|
|
if [[ -d "${_gitname}" ]]; then
|
|
|
|
cd "${_gitname}" && git pull origin
|
|
|
|
msg2 "The local files are updated."
|
|
|
|
else
|
2014-04-03 06:14:06 +00:00
|
|
|
git clone --branch=${_gitbranch} --depth 1 "${_gitroot}/${_gitname}"
|
2013-06-12 04:52:38 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
msg2 "GIT checkout done or server timeout."
|
|
|
|
|
|
|
|
|
2012-09-20 14:27:56 +00:00
|
|
|
cd "${srcdir}/${_gitname}"
|
|
|
|
|
2014-07-13 05:09:52 +00:00
|
|
|
patch -Np1 -i "$srcdir/fix_libnfs.patch"
|
|
|
|
|
2012-09-20 14:27:56 +00:00
|
|
|
# fix lsb_release dependency
|
|
|
|
sed -i -e 's:/usr/bin/lsb_release -d:cat /etc/arch-release:' xbmc/utils/SystemInfo.cpp
|
2013-05-12 14:52:00 +00:00
|
|
|
|
2013-04-27 09:21:50 +00:00
|
|
|
# fix samba4 libsmbclient.h location
|
|
|
|
sed -e 's/\(#include \)<libsmbclient\.h>/\1<samba-4.0\/libsmbclient\.h>/g' \
|
|
|
|
-i xbmc/filesystem/SmbFile.cpp \
|
|
|
|
-i xbmc/filesystem/SMBDirectory.cpp
|
2013-04-08 18:51:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "${srcdir}/${_gitname}"
|
2012-09-20 14:27:56 +00:00
|
|
|
|
|
|
|
# Bootstrapping XBMC
|
|
|
|
./bootstrap
|
|
|
|
|
|
|
|
# Configuring XBMC
|
|
|
|
export PYTHON_VERSION=2 # external python v2
|
|
|
|
# we need to compile for armv6 instead of armv5 to avoid problems compiling assembler code
|
2013-12-30 05:21:53 +00:00
|
|
|
export CFLAGS="-Ofast -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -fexcess-precision=fast -mfloat-abi=hard \
|
2014-02-02 05:51:10 +00:00
|
|
|
-mfpu=vfp -mabi=aapcs-linux -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=1 \
|
2013-12-30 05:21:53 +00:00
|
|
|
-I/opt/vc/include/ -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
|
|
|
|
export CXXFLAGS="-Ofast -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -fexcess-precision=fast -mfloat-abi=hard -mfpu=vfp \
|
2014-02-02 05:51:10 +00:00
|
|
|
-mabi=aapcs-linux -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=1 \
|
2013-12-30 05:21:53 +00:00
|
|
|
-I/opt/vc/include/ -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
|
2012-09-20 14:27:56 +00:00
|
|
|
export LDFLAGS="$LDFLAGS -L/opt/vc/lib"
|
2014-07-11 06:01:14 +00:00
|
|
|
export MAKEFLAGS="-j1"
|
2013-12-30 05:21:53 +00:00
|
|
|
|
2012-09-20 14:27:56 +00:00
|
|
|
./configure --prefix=$_prefix --exec-prefix=$_prefix \
|
2013-12-30 05:21:53 +00:00
|
|
|
--with-platform=raspberry-pi \
|
|
|
|
--disable-gl \
|
|
|
|
--enable-gles \
|
|
|
|
--disable-x11 \
|
|
|
|
--disable-sdl \
|
|
|
|
--enable-optimizations \
|
|
|
|
--disable-external-libraries \
|
|
|
|
--disable-goom \
|
|
|
|
--disable-hal \
|
|
|
|
--disable-pulse \
|
|
|
|
--disable-vaapi \
|
|
|
|
--disable-vdpau \
|
|
|
|
--disable-xrandr \
|
|
|
|
--enable-airplay \
|
|
|
|
--enable-airtunes \
|
|
|
|
--disable-alsa \
|
|
|
|
--enable-avahi \
|
|
|
|
--enable-libbluray \
|
|
|
|
--enable-dvdcss \
|
|
|
|
--disable-debug \
|
|
|
|
--disable-joystick \
|
|
|
|
--disable-mid \
|
|
|
|
--enable-nfs \
|
|
|
|
--disable-profiling \
|
|
|
|
--disable-projectm \
|
|
|
|
--enable-rsxs \
|
|
|
|
--enable-rtmp \
|
|
|
|
--disable-vaapi \
|
|
|
|
--disable-vdadecoder \
|
|
|
|
--disable-external-ffmpeg \
|
|
|
|
--enable-optical-drive \
|
|
|
|
--enable-player=omxplayer
|
2012-09-20 14:27:56 +00:00
|
|
|
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
|
|
|
|
|
2014-01-28 10:08:26 +00:00
|
|
|
# Remove checks that don't apply to the raspberry pi
|
2012-09-20 14:27:56 +00:00
|
|
|
head -n 171 "${pkgdir}${_prefix}/share/xbmc/FEH.py" > "${pkgdir}${_prefix}/share/xbmc/FEH.py.new"
|
|
|
|
mv "${pkgdir}${_prefix}/share/xbmc/FEH.py.new" "${pkgdir}${_prefix}/share/xbmc/FEH.py"
|
|
|
|
|
|
|
|
# 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}/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
|
|
|
|
|
2013-02-02 23:01:39 +00:00
|
|
|
install -Dm0644 $srcdir/xbmc.service $pkgdir/usr/lib/systemd/system/xbmc.service
|
2014-01-28 10:08:26 +00:00
|
|
|
install -Dm0644 $srcdir/polkit.rules $pkgdir/usr/share/polkit-1/rules.d/10-xbmc.rules
|
|
|
|
chmod 0700 $pkgdir/usr/share/polkit-1/rules.d/
|
2012-09-20 14:27:56 +00:00
|
|
|
}
|