2013-02-02 08:59:56 +00:00
|
|
|
# Contributor tomasgroth at yahoo.dk
|
|
|
|
# Contributor WarheadsSE <max@warheads.net>
|
2014-03-04 02:34:09 +00:00
|
|
|
# Contributor Romzetron <asromzek@gmail.com>
|
2014-05-22 10:34:19 +00:00
|
|
|
# Contributor Holzhaus <holthuis.jan@googlemail.com>
|
|
|
|
|
2015-02-05 00:13:27 +00:00
|
|
|
buildarch=20
|
2013-02-02 08:59:56 +00:00
|
|
|
|
2014-12-27 00:43:47 +00:00
|
|
|
pkgname=kodi-rbp
|
2015-02-01 01:57:49 +00:00
|
|
|
pkgver=14.1
|
2014-12-27 00:43:47 +00:00
|
|
|
_codename=Helix
|
2015-02-26 02:54:33 +00:00
|
|
|
pkgrel=4
|
2013-02-02 08:59:56 +00:00
|
|
|
pkgdesc="A software media player and entertainment hub for digital media for the Raspberry Pi"
|
2015-02-05 00:13:27 +00:00
|
|
|
arch=('armv6h' 'armv7h')
|
2014-12-27 00:43:47 +00:00
|
|
|
url="http://kodi.tv"
|
2013-02-02 08:59:56 +00:00
|
|
|
license=('GPL' 'custom')
|
2015-02-10 04:53:49 +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-rpi' 'libplist' 'swig' 'taglib' 'libxslt' 'shairplay-git')
|
2014-05-22 10:34:19 +00:00
|
|
|
makedepends=('boost' 'cmake' 'gperf' 'nasm' 'zip' 'udisks' 'upower' 'git' 'autoconf' 'java-environment')
|
2013-02-02 08:59:56 +00:00
|
|
|
optdepends=(
|
|
|
|
'lirc: remote controller support'
|
|
|
|
'udisks: automount external drives'
|
2014-01-28 10:45:38 +00:00
|
|
|
'upower: used to trigger power management functionality'
|
2014-05-22 10:34:19 +00:00
|
|
|
'unrar: access compressed files without unpacking them')
|
|
|
|
|
2015-02-01 01:57:49 +00:00
|
|
|
provides=('xbmc' 'kodi')
|
|
|
|
conflicts=('xbmc' 'kodi')
|
|
|
|
replaces=('xbmc-rbp')
|
2014-12-27 00:43:47 +00:00
|
|
|
install="kodi.install"
|
2014-06-07 18:23:30 +00:00
|
|
|
source=("https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
|
2014-12-27 00:43:47 +00:00
|
|
|
'kodi.service'
|
|
|
|
'polkit.rules')
|
|
|
|
|
2015-02-01 01:57:49 +00:00
|
|
|
sha256sums=('a38059e292cf8523918834e49fcc2d688525ceb7951ddf7f5ee535f4147255d6'
|
2014-12-27 00:43:47 +00:00
|
|
|
'5235068d5800d69f0287087815990e7fe8d6572733d60c8800546d35f608e87f'
|
|
|
|
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96')
|
2013-02-02 08:59:56 +00:00
|
|
|
_prefix=/usr
|
|
|
|
|
2013-04-27 09:21:50 +00:00
|
|
|
prepare() {
|
2014-05-22 10:34:19 +00:00
|
|
|
cd "$srcdir/xbmc-$pkgver-$_codename"
|
2013-02-02 08:59: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-04-27 09:21:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2014-05-22 10:34:19 +00:00
|
|
|
cd "$srcdir/xbmc-$pkgver-$_codename"
|
2013-02-02 08:59:56 +00:00
|
|
|
|
2014-12-27 00:43:47 +00:00
|
|
|
# Bootstrapping Kodi
|
2013-02-02 08:59:56 +00:00
|
|
|
./bootstrap
|
|
|
|
|
2014-12-27 00:43:47 +00:00
|
|
|
# Configuring Kodi
|
2013-02-02 08:59:56 +00:00
|
|
|
export PYTHON_VERSION=2 # external python v2
|
|
|
|
# we need to compile for armv6 instead of armv5 to avoid problems compiling assembler code
|
2015-02-05 00:13:27 +00:00
|
|
|
FLAGS="-Ofast -fexcess-precision=fast -mfloat-abi=hard -mabi=aapcs-linux -pipe -fstack-protector --param=ssp-buffer-size=4 \
|
|
|
|
-D_FORTIFY_SOURCE=1 -I/opt/vc/include/ -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
|
2015-02-10 05:36:41 +00:00
|
|
|
[[ $CARCH == "armv6h" ]] && export CFLAGS="$FLAGS -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp" && export CXXFLAGS="$FLAGS -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp"
|
2015-02-05 00:13:27 +00:00
|
|
|
[[ $CARCH == "armv7h" ]] && export CFLAGS="$FLAGS -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mvectorize-with-neon-quad" && export CXXFLAGS="$FLAGS -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mvectorize-with-neon-quad"
|
|
|
|
|
2013-02-02 08:59:56 +00:00
|
|
|
export LDFLAGS="$LDFLAGS -L/opt/vc/lib"
|
2014-09-22 04:34:44 +00:00
|
|
|
|
2015-02-05 00:13:27 +00:00
|
|
|
|
2014-09-22 04:34:44 +00:00
|
|
|
#If build fails try uncommenting the line below first
|
|
|
|
#export MAKEFLAGS="-j1"
|
2014-05-22 10:34:19 +00:00
|
|
|
|
|
|
|
./configure --prefix=$_prefix --exec-prefix=$_prefix \
|
|
|
|
--with-platform=raspberry-pi \
|
2014-01-05 13:44:17 +00:00
|
|
|
--disable-gl \
|
|
|
|
--enable-gles \
|
|
|
|
--disable-x11 \
|
2014-05-22 10:34:19 +00:00
|
|
|
--disable-sdl \
|
|
|
|
--enable-optimizations \
|
|
|
|
--disable-goom \
|
|
|
|
--disable-pulse \
|
2014-01-05 13:44:17 +00:00
|
|
|
--disable-vaapi \
|
|
|
|
--disable-vdpau \
|
2014-05-22 10:34:19 +00:00
|
|
|
--disable-xrandr \
|
|
|
|
--enable-airplay \
|
|
|
|
--enable-airtunes \
|
|
|
|
--enable-avahi \
|
|
|
|
--enable-libbluray \
|
2014-01-05 13:44:17 +00:00
|
|
|
--enable-dvdcss \
|
2014-05-22 10:34:19 +00:00
|
|
|
--disable-debug \
|
|
|
|
--disable-joystick \
|
|
|
|
--disable-mid \
|
|
|
|
--enable-nfs \
|
|
|
|
--disable-profiling \
|
|
|
|
--disable-projectm \
|
|
|
|
--enable-rsxs \
|
|
|
|
--enable-rtmp \
|
|
|
|
--disable-vaapi \
|
2014-01-05 13:44:17 +00:00
|
|
|
--enable-optical-drive \
|
|
|
|
--enable-player=omxplayer
|
2013-02-02 08:59:56 +00:00
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2014-05-22 10:34:19 +00:00
|
|
|
cd "$srcdir/xbmc-$pkgver-$_codename"
|
2013-02-02 08:59:56 +00:00
|
|
|
# Running make install
|
|
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
|
|
|
|
# run feh with python2
|
2014-12-27 00:43:47 +00:00
|
|
|
sed -i -e 's/python/python2/g' ${pkgdir}${_prefix}/bin/kodi
|
2013-02-02 08:59:56 +00:00
|
|
|
|
|
|
|
# lsb_release fix
|
2014-12-27 00:43:47 +00:00
|
|
|
sed -i -e 's/which lsb_release > \/dev\/null/\[ -f \/etc\/arch-release ]/g' "${pkgdir}${_prefix}/bin/kodi"
|
|
|
|
sed -i -e "s/lsb_release -a 2> \/dev\/null | sed -e 's\/\^\/ \/'/cat \/etc\/arch-release/g" "${pkgdir}${_prefix}/bin/kodi"
|
2013-02-02 08:59:56 +00:00
|
|
|
|
|
|
|
# Tools
|
2014-12-27 00:43:47 +00:00
|
|
|
install -D -m 0755 "${srcdir}/xbmc-${pkgver}-${_codename}/tools/TexturePacker/TexturePacker" "${pkgdir}${_prefix}/lib/kodi/"
|
2013-02-02 08:59:56 +00:00
|
|
|
|
|
|
|
# Licenses
|
|
|
|
install -d -m 0755 "${pkgdir}${_prefix}/share/licenses/${pkgname}"
|
|
|
|
for licensef in LICENSE.GPL copying.txt; do
|
2014-12-27 00:43:47 +00:00
|
|
|
mv "${pkgdir}${_prefix}/share/doc/kodi/${licensef}" "${pkgdir}${_prefix}/share/licenses/${pkgname}"
|
2013-02-02 08:59:56 +00:00
|
|
|
done
|
|
|
|
|
2014-12-27 00:43:47 +00:00
|
|
|
install -Dm0644 $srcdir/kodi.service $pkgdir/usr/lib/systemd/system/kodi.service
|
|
|
|
install -Dm0644 $srcdir/polkit.rules $pkgdir/usr/share/polkit-1/rules.d/10-kodi.rules
|
2014-01-28 10:45:38 +00:00
|
|
|
chmod 0700 $pkgdir/usr/share/polkit-1/rules.d/
|
2013-02-02 08:59:56 +00:00
|
|
|
}
|