mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
156 lines
6.2 KiB
Bash
156 lines
6.2 KiB
Bash
# Contributor Oleg Rakhmanov <oleg [at] archlinuxarm [dot] com>
|
|
# Contributor tomasgroth at yahoo.dk
|
|
# Contributor WarheadsSE <max@warheads.net>
|
|
# Contributor Adrian Fedoreanu <adrian [dot] fedoreanu [at] gmail [dot] com>
|
|
|
|
buildarch=20
|
|
|
|
_prefix=/usr
|
|
|
|
pkgbase=kodi-rbp-git
|
|
pkgname=('kodi-rbp-git' 'kodi-rbp-git-eventclients')
|
|
pkgver=17.0a1.20160510
|
|
|
|
_tag=17.0a1-Krypton
|
|
pkgrel=2
|
|
pkgdesc="A software media player and entertainment hub for digital media for the Raspberry Pi"
|
|
arch=('armv6h' 'armv7h')
|
|
url="http://kodi.tv"
|
|
license=('GPL2')
|
|
makedepends=('hicolor-icon-theme' 'fribidi' 'lzo2' 'smbclient' 'libtiff' 'libva' 'libpng' 'libcdio'
|
|
'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd'
|
|
'sdl_image' 'python2' 'python2-pillow' 'python2-pybluez' 'python2-simplejson' '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' 'boost' 'cmake' 'gperf' 'nasm' 'zip'
|
|
'udisks' 'upower' 'git' 'autoconf' 'java-environment' 'libcrossguid-git' 'dcadec')
|
|
source=("xbmc-${_tag}.tar.gz::https://github.com/xbmc/xbmc/archive/${_tag}.tar.gz"
|
|
'kodi.service'
|
|
'polkit.rules'
|
|
'fix_libdvd.patch')
|
|
|
|
sha256sums=('37cb300ae15a77bdd9c71861ca3f5bdb98504884fda55ef94a6a1892fb6ee621'
|
|
'5235068d5800d69f0287087815990e7fe8d6572733d60c8800546d35f608e87f'
|
|
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96'
|
|
'e98da71fafe17943f024d190de415658ce61b1d506057332af329f08d675e469')
|
|
prepare() {
|
|
cd "$srcdir/xbmc-${_tag}"
|
|
|
|
find -type f -name *.py -exec sed 's|^#!.*python$|#!/usr/bin/python2|' -i "{}" +
|
|
sed 's|^#!.*python$|#!/usr/bin/python2|' -i tools/depends/native/rpl-native/rpl
|
|
sed 's/python/python2/' -i tools/Linux/kodi.sh.in
|
|
sed 's/shell python/shell python2/' -i tools/EventClients/Makefile.in
|
|
# disable wiiremote due to incompatibility with bluez-5.29
|
|
sed '/WiiRemote/d' -i tools/EventClients/Makefile.in
|
|
sed '/mkdir -p $(DESTDIR)$(bindir)/i \
|
|
install:' -i tools/EventClients/Makefile.in
|
|
|
|
if [[ $CARCH == "armv6h" ]]; then
|
|
patch -Np0 -i ${srcdir}/fix_libdvd.patch
|
|
fi
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/xbmc-${_tag}"
|
|
|
|
# Bootstrapping
|
|
MAKEFLAGS=-j1 ./bootstrap
|
|
|
|
# Configuring Kodi
|
|
export PYTHON_VERSION=2 # external python v2
|
|
# we need to compile for armv6 instead of armv5 to avoid problems compiling assembler code
|
|
FLAGS="-Ofast -fexcess-precision=fast -mfloat-abi=hard -mabi=aapcs-linux -pipe -fstack-protector --param=ssp-buffer-size=4 -D_GLIBCXX_USE_CXX11_ABI=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"
|
|
[[ $CARCH == "armv6h" ]] && export CFLAGS="$FLAGS -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp" && export CXXFLAGS="$FLAGS -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp"
|
|
[[ $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"
|
|
|
|
export LDFLAGS="$LDFLAGS -L/opt/vc/lib"
|
|
|
|
# If build fails try uncommenting the line below first
|
|
# export MAKEFLAGS="-j1"
|
|
|
|
./configure --prefix=$_prefix --exec-prefix=$_prefix \
|
|
--with-platform=raspberry-pi \
|
|
--disable-gl \
|
|
--enable-gles \
|
|
--disable-x11 \
|
|
--enable-optimizations \
|
|
--disable-pulse \
|
|
--disable-vaapi \
|
|
--disable-vdpau \
|
|
--enable-airplay \
|
|
--enable-airtunes \
|
|
--enable-avahi \
|
|
--enable-libbluray \
|
|
--enable-dvdcss \
|
|
--disable-debug \
|
|
--disable-joystick \
|
|
--disable-mid \
|
|
--enable-nfs \
|
|
--disable-profiling \
|
|
--enable-rtmp \
|
|
--enable-optical-drive \
|
|
--enable-player=omxplayer \
|
|
--with-lirc-device=/run/lirc/lircd \
|
|
ac_cv_lib_bluetooth_hci_devid=no
|
|
make
|
|
}
|
|
|
|
package_kodi-rbp-git() {
|
|
pkgdesc="A software media player and entertainment hub for digital media (Raspberry Pi)"
|
|
|
|
# depends expected for kodi plugins:
|
|
# 'python2-pillow' 'python2-pybluez' 'python2-simplejson'
|
|
# depends expeced in FEH.py
|
|
# 'mesa-demos' 'xorg-xdpyinfo'
|
|
depends=('hicolor-icon-theme' 'fribidi' 'lzo2' 'smbclient' 'libtiff' 'libva' 'libpng' 'libcdio'
|
|
'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd'
|
|
'sdl_image' 'python2' 'python2-pillow' 'python2-pybluez' 'python2-simplejson' 'libass'
|
|
'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'xorg-xdpyinfo' 'libbluray'
|
|
'libnfs' 'avahi' 'bluez-libs' 'tinyxml' 'raspberrypi-firmware' 'libcec-rpi'
|
|
'libplist' 'swig' 'taglib' 'libxslt' 'shairplay' 'libcrossguid-git')
|
|
|
|
optdepends=(
|
|
'afpfs-ng: Apple shares support'
|
|
'lirc: remote controller support'
|
|
'polkit: permissions for automounting external drives and power management functionality'
|
|
'udisks: automount external drives'
|
|
'upower: used to trigger power management functionality'
|
|
'unrar: access compressed files without unpacking them'
|
|
'lsb-release: log distro information in crashlog')
|
|
|
|
install="kodi.install"
|
|
provides=('xbmc' 'kodi')
|
|
conflicts=('xbmc' 'kodi' 'arm-mem-git' 'shairplay-git')
|
|
replaces=('xbmc-rbp-git')
|
|
|
|
cd "$srcdir/xbmc-${_tag}"
|
|
# Running make install
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
# We will no longer support the xbmc name
|
|
rm "$pkgdir/usr/share/xsessions/xbmc.desktop"
|
|
rm "$pkgdir/usr/bin/"xbmc{,-standalone}
|
|
# we will leave /usr/{include,lib,share}/xbmc for now
|
|
|
|
# Licenses
|
|
install -d -m 0755 "${pkgdir}${_prefix}/share/licenses/${pkgname}"
|
|
for licensef in LICENSE.GPL copying.txt; do
|
|
mv "${pkgdir}${_prefix}/share/doc/kodi/${licensef}" "${pkgdir}${_prefix}/share/licenses/${pkgname}"
|
|
done
|
|
|
|
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
|
|
chmod 0700 $pkgdir/usr/share/polkit-1/rules.d/
|
|
}
|
|
|
|
package_kodi-rbp-git-eventclients() {
|
|
pkgdesc="Kodi Event Clients (Raspberry Pi)"
|
|
provides=('kodi-eventclients')
|
|
conflicts=('kodi-eventclients')
|
|
depends=('cwiid')
|
|
|
|
cd "$srcdir/xbmc-${_tag}"
|
|
|
|
make DESTDIR="$pkgdir" eventclients WII_EXTRA_OPTS=-DCWIID_OLD
|
|
}
|