alarm/kodi-c1 to 17.5-1 (#1538)

This commit is contained in:
erikfleischer 2017-11-19 17:54:36 +01:00 committed by Kevin Mihelich
parent 042ec9ef34
commit 048711bb57
8 changed files with 278 additions and 1515 deletions

View file

@ -0,0 +1,8 @@
KERNEL=="CEC", MODE="0666", GROUP="video"
KERNEL=="mali*", MODE="0666", GROUP="video"
KERNEL=="am*", MODE="0666", GROUP="video"
KERNEL=="ump", MODE="0666", GROUP="video"
KERNEL=="drm", MODE="0666", GROUP="video"
KERNEL=="ge2d", MODE="0666", GROUP="video"
KERNEL=="brightness", MODE="0666", GROUP="video"
KERNEL=="ttySAC0", SYMLINK+="ttyACM99"

View file

@ -1,141 +1,233 @@
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
# Maintainer: Oleg Rakhmanov <oleg@archlinuxarm.org>
# vim:set ts=2 sw=2 et:
# $Id$
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: BlackIkeEagle < ike DOT devolder AT gmail DOT com >
# Contributor: graysky <graysky AT archlinux DOT us>
# Contributor: DonVla <donvla@users.sourceforge.net>
# Contributor: Ulf Winkelvos <ulf [at] winkelvos [dot] de>
# Contributor: Ralf Barth <archlinux dot org at haggy dot org>
# Contributor: B & monty - Thanks for your hints :)
# Contributor: marzoul
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: BlackIkeEagle < ike DOT devolder AT gmail DOT com >
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
# Contributor: Zeqadious <zeqadious.at.gmail.dot.com>
# Contributor: BlackIkeEagle < ike DOT devolder AT gmail DOT com >
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Maxime Gauduin <alucryd@gmail.com>
# Contributor: Jan Holthuis <holthuis dot jan at googlemail dot com>
#
# Original credits go to Edgar Hucek <gimli at dark-green dot com>
# for his xbmc-vdpau-vdr PKGBUILD at https://archvdr.svn.sourceforge.net/svnroot/archvdr/trunk/archvdr/xbmc-vdpau-vdr/PKGBUILD
buildarch=4
_prefix=/usr
pkgbase=kodi-c1
pkgname=('kodi-c1' 'kodi-c1-eventclients')
_commit=cdb7704d1174395f399657fd3f562fe236516b9f
pkgver=16.1
pkgrel=2
pkgname=('kodi-c1' 'kodi-c1-eventclients' 'kodi-c1-tools-texturepacker' 'kodi-c1-dev')
pkgver=17.5
_commit=5bc2e3c81fd8e5a395b1aa73ff2a9e5512d86fdf
pkgrel=1
arch=('armv7h')
url="http://kodi.tv"
license=('GPL2')
makedepends=(
'afpfs-ng' 'bluez-libs' 'boost' 'cmake' 'curl' 'cwiid' 'doxygen' 'git' 'glew'
'afpfs-ng' 'bluez-libs' 'boost' 'cmake' 'curl' 'cwiid' 'doxygen' 'glew'
'gperf' 'hicolor-icon-theme' 'jasper' 'java-runtime' 'libaacs' 'libass'
'libbluray' 'libcdio' 'odroid-c1-libgl-x11' 'libmariadbclient' 'libmicrohttpd'
'libbluray' 'libcdio' 'libcec' 'libgl' 'libmariadbclient' 'libmicrohttpd'
'libmodplug' 'libmpeg2' 'libnfs' 'libplist' 'libpulse' 'libssh' 'libva'
'libxrandr' 'libxslt' 'lzo' 'nasm' 'nss-mdns' 'python2-pillow' 'aml-libs-c1'
'python2-pybluez' 'python2-simplejson' 'rtmpdump' 'sdl2' 'sdl_image'
'libvdpau' 'libxrandr' 'libxslt' 'lzo' 'nasm' 'nss-mdns' 'python2-pillow'
'python2-pybluez' 'python2-simplejson' 'rtmpdump'
'shairplay' 'smbclient' 'swig' 'taglib' 'tinyxml' 'unzip' 'upower' 'yajl' 'zip'
'mesa' 'libdcadec.so' 'libcrossguid'
'mesa' 'libcrossguid'
'odroid-c1-libgl-fb' 'odroid-c1-libgl-headers' 'aml-libs-c1'
)
source=("https://github.com/Owersun/xbmc/archive/${_commit}.tar.gz"
'gcc6_fix.patch')
sha256sums=('a56165257af0ee6899317093c412603b01967068536ae200dfcab0b74bdc501d'
'b0fe75d10b2678894d1dec48f3258c0bec2a4a170f33d76a9a8334bb1969b18f')
source=(
"https://github.com/Owersun/xbmc/archive/${_commit}.tar.gz"
'fix-python-lib-path.patch'
'kodi_permissions.conf'
'kodi.service'
'polkit.rules'
'99-odroid.rules'
)
sha512sums=('fe01fca8791dd0ef5e5c4f625f4b2cb1874ef88a4d8b4dcb9d11b3b8bc8ab9f818fa439a8bd6e4b3260449f1ed007853fd1c591535f8e2d6cfe5f7925997417b'
'0f41604e38648969572a66d1124d6e090c3bfca4f9d8ccabcd1806254c38b178ee08df35e1bbbd1228f820729df52353321b3257122af601c3233dbc6405c6d2'
'890ed1fb944c337ed04397db7b2c8de5ef74f25eb49936e2fec418baf279cfa7d3ba292ccd6beccb60f83dc94b020d068162bc2c9a4ede8392d64ad7edcd5601'
'9953861cd17ec4c31094a2b1ef7161df13759b4b840cbc0231650ffc5349aa3ce98d8b860b1109eac22c6dcd153c43e165ed3451e5dbe2a3dbe130db53c28ad4'
'2e28e1366b89a94848822ccf8f6874fc69c1b2ffd27b129132e793bc41d27652f87d53deb48ff9a1dc01050f39a2bafa16b58e2a9c1c0f3cdc4155cd357c9b2a'
'dcb23c9074a6f646c419957169642bfd565e004f221bd972ae6034bcc4ef6aa6f4f2bbda011c759fef769b682f7a686cc041a02e5326530bd1ad2011366d1529')
prepare() {
cd xbmc-${_commit}
[[ -d kodi-build ]] && rm -rf kodi-build
mkdir kodi-build
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
patch -Np1 -i ${srcdir}/gcc6_fix.patch
cd "xbmc-$_commit"
patch -p1 -i "$srcdir/fix-python-lib-path.patch"
}
build() {
cd xbmc-${_commit}
CFLAGS=`echo $CFLAGS | sed -e 's/vfpv3-d16/neon/'` && CXXFLAGS="$CFLAGS"
LDFLAGS+=" -L/usr/lib/mali-egl -L/usr/lib/aml_libs"
# Bootstrapping
MAKEFLAGS=-j1 ./bootstrap
#./configure --help
#return 1
# Configuring XBMC
export PYTHON_VERSION=2 # external python v2
./configure --prefix=$_prefix \
gl_cv_func_gettimeofday_clobber=no ac_cv_lib_bluetooth_hci_devid=no \
--disable-debug \
--enable-optimizations \
--enable-libbluray \
--disable-texturepacker \
--enable-external-libraries \
--with-lirc-device=/run/lirc/lircd \
--disable-vaapi \
--disable-vdpau \
--disable-static --enable-shared \
--disable-rsxs \
--enable-codec=amcodec
# Now (finally) build
cd kodi-build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DENABLE_EVENTCLIENTS=ON \
-DLIRC_DEVICE=/run/lirc/lircd \
-DENABLE_AML=ON \
-DENABLE_OPENGL=OFF \
-DENABLE_OPENGLES=ON \
-DENABLE_PULSEAUDIO=OFF \
-DENABLE_VAAPI=OFF \
-DENABLE_VDPAU=OFF \
-DENABLE_X11=OFF \
../"xbmc-$_commit"/project/cmake
make
make preinstall
}
# kodi
# components: kodi, kodi-bin
package_kodi-c1() {
pkgdesc="A software media player and entertainment hub for digital media (ODROID-C1)"
# depends expected for kodi plugins:
# 'python2-pillow' 'python2-pybluez' 'python2-simplejson'
# depends expeced in FEH.py
# 'mesa-demos' 'xorg-xdpyinfo'
depends=(
'python2-pillow' 'python2-pybluez' 'python2-simplejson'
'mesa-demos' 'xorg-xdpyinfo'
'bluez-libs' 'fribidi' 'glew' 'hicolor-icon-theme' 'libcdio'
'libjpeg-turbo' 'libmariadbclient' 'libmicrohttpd' 'libpulse' 'libssh'
'libva' 'libxrandr' 'libxslt' 'lzo' 'sdl2' 'smbclient' 'taglib' 'tinyxml'
'yajl' 'odroid-c1-libgl' 'aml-libs-c1' 'mesa' 'libdcadec.so'
'python2-pillow' 'python2-simplejson' 'xorg-xdpyinfo' 'bluez-libs'
'fribidi' 'freetype2' 'glew' 'hicolor-icon-theme' 'libcdio' 'libjpeg-turbo'
'libmariadbclient' 'libmicrohttpd' 'libpulse' 'libssh' 'libva' 'libvdpau'
'libxrandr' 'libxslt' 'lzo' 'smbclient' 'taglib' 'tinyxml' 'yajl' 'mesa'
'desktop-file-utils'
'odroid-c1-libgl-fb' 'aml-libs-c1'
)
optdepends=(
'afpfs-ng: Apple shares support'
'bluez: Blutooth support'
'python2-pybluez: Bluetooth support'
'libnfs: NFS shares support'
'libplist: AirPlay support'
'libcec: Pulse-Eight USB-CEC adapter support'
'lirc: Remote controller support'
'lsb-release: log distro information in crashlog'
'pulseaudio: PulseAudio support'
'shairplay: AirPlay support'
'udisks: Automount external drives'
'unrar: Archives support'
'unzip: Archives support'
'upower: Display battery level'
'lsb-release: log distro information in crashlog'
)
install="kodi.install"
provides=('xbmc' 'kodi')
conflicts=('xbmc' 'kodi' 'shairplay-git')
install='kodi.install'
provides=('kodi' 'xbmc')
conflicts=('kodi' 'xbmc')
replaces=('xbmc')
cd xbmc-${_commit}
# Running make install
make DESTDIR="$pkgdir" install
_components=(
'kodi'
'kodi-bin'
)
cd kodi-build
# install eventclients
for _cmp in ${_components[@]}; do
DESTDIR="$pkgdir" /usr/bin/cmake \
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
-P cmake_install.cmake
done
# Licenses
install -dm755 ${pkgdir}${_prefix}/share/licenses/${pkgname}
install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
for licensef in LICENSE.GPL copying.txt; do
mv ${pkgdir}${_prefix}/share/doc/kodi/${licensef} \
${pkgdir}${_prefix}/share/licenses/${pkgname}
mv "$pkgdir/usr/share/doc/kodi/$licensef" \
"$pkgdir/usr/share/licenses/$pkgname"
done
# python2 is being used
cd "$pkgdir"
grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done
install -Dm0644 $srcdir/kodi_permissions.conf $pkgdir/etc/tmpfiles.d/kodi_permissions.conf
install -Dm0644 $srcdir/kodi.service $pkgdir/usr/lib/systemd/system/kodi.service
install -Dm0644 $srcdir/polkit.rules $pkgdir/etc/polkit-1/rules.d/10-kodi.rules
# fix permissions necessary for accelerated video playback
install -Dm0644 $srcdir/99-odroid.rules $pkgdir/etc/udev/rules.d/99-odroid.rules
}
# kodi-eventclients
# components: kodi-eventclients-common kodi-eventclients-ps3 kodi-eventclients-wiiremote kodi-eventclients-xbmc-send
package_kodi-c1-eventclients() {
pkgdesc="Kodi Event Clients (ODROID-C1)"
provides=('kodi-eventclients')
conflicts=('kodi-eventclients')
depends=('cwiid')
cd ${srcdir}/xbmc-${_commit}
_components=(
'kodi-eventclients-common'
'kodi-eventclients-ps3'
'kodi-eventclients-wiiremote'
'kodi-eventclients-xbmc-send'
)
make DESTDIR="$pkgdir" eventclients WII_EXTRA_OPTS=-DCWIID_OLD
cd kodi-build
# install eventclients
for _cmp in ${_components[@]}; do
DESTDIR="$pkgdir" /usr/bin/cmake \
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
-P cmake_install.cmake
done
install -dm755 "$pkgdir/usr/lib/python2.7/$pkgbase"
mv "$pkgdir/kodi"/* "$pkgdir/usr/lib/python2.7/$pkgbase"
rmdir "$pkgdir/kodi"
# python2 is being used
cd "$pkgdir"
grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done
}
# kodi-tools-texturepacker
# components: kodi-tools-texturepacker
package_kodi-c1-tools-texturepacker() {
pkgdesc="Kodi Texturepacker tool (ODROID-C1)"
depends=('libpng' 'giflib' 'libjpeg-turbo' 'lzo')
provides=('kodi-tools-texturepacker')
conflicts=('kodi-tools-texturepacker')
_components=(
'kodi-tools-texturepacker'
)
cd kodi-build
# install eventclients
for _cmp in ${_components[@]}; do
DESTDIR="$pkgdir" /usr/bin/cmake \
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
-P cmake_install.cmake
done
}
# kodi-dev
# components: kodi-addon-dev kodi-audio-dev kodi-eventclients-dev kodi-game-dev kodi-inputstream-dev kodi-peripheral-dev kodi-pvr-dev kodi-screensaver-dev kodi-visualization-dev
package_kodi-c1-dev() {
pkgdesc="Kodi dev files (ODROID-C1)"
depends=('kodi')
provides=('kodi-dev')
conflicts=('kodi-dev')
_components=(
'kodi-addon-dev'
'kodi-audio-dev'
'kodi-eventclients-dev'
'kodi-game-dev'
'kodi-inputstream-dev'
'kodi-peripheral-dev'
'kodi-pvr-dev'
'kodi-screensaver-dev'
'kodi-visualization-dev'
)
cd kodi-build
# install eventclients
for _cmp in ${_components[@]}; do
DESTDIR="$pkgdir" /usr/bin/cmake \
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
-P cmake_install.cmake
done
# python2 is being used
cd "$pkgdir"
grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done
}

View file

@ -0,0 +1,29 @@
--- a/project/cmake/scripts/linux/Install.cmake 2017-03-20 17:17:49.000000000 +0100
+++ b/project/cmake/scripts/linux/Install.cmake 2017-05-20 15:42:09.608550173 +0200
@@ -199,7 +199,7 @@
install(PROGRAMS ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/bt/__init__.py
${CORE_SOURCE_DIR}/tools/EventClients/lib/python/bt/bt.py
${CORE_SOURCE_DIR}/tools/EventClients/lib/python/bt/hid.py
- DESTINATION lib/python2.7/dist-packages/${APP_NAME_LC}/bt
+ DESTINATION lib/python2.7/site-packages/${APP_NAME_LC}/bt
COMPONENT kodi-eventclients-common)
# Install kodi-eventclients-common PS3 python files
@@ -208,7 +208,7 @@
${CORE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/sixaxis.py
${CORE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/sixpair.py
${CORE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/sixwatch.py
- DESTINATION lib/python2.7/dist-packages/${APP_NAME_LC}/ps3
+ DESTINATION lib/python2.7/site-packages/${APP_NAME_LC}/ps3
COMPONENT kodi-eventclients-common)
# Install kodi-eventclients-common python files
@@ -218,7 +218,7 @@
"${CORE_SOURCE_DIR}/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py"
${CORE_SOURCE_DIR}/tools/EventClients/lib/python/xbmcclient.py
${CORE_SOURCE_DIR}/tools/EventClients/lib/python/zeroconf.py
- DESTINATION lib/python2.7/dist-packages/${APP_NAME_LC}
+ DESTINATION lib/python2.7/site-packages/${APP_NAME_LC}
COMPONENT kodi-eventclients-common)
# Install kodi-eventclients-common icons

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,19 @@
post_install() {
update_icons
getent group kodi > /dev/null || groupadd -r kodi
getent passwd kodi > /dev/null || useradd -r -m -d /var/lib/kodi -g kodi -s /usr/bin/nologin kodi
usermod -a -G kodi,audio,video,power,network,optical,storage,disk,input,tty kodi
mkdir -p var/lib/kodi
chown -R kodi:kodi var/lib/kodi
}
post_upgrade() {
update_icons
post_install $1
}
post_remove() {
update_icons
getent passwd kodi > /dev/null && userdel kodi
}
update_icons() {

View file

@ -0,0 +1,13 @@
[Unit]
Description = Starts an instance of Kodi
After = remote-fs.target
[Service]
User = kodi
Group = kodi
Type = simple
ExecStart = /usr/bin/kodi
Restart = on-failure
[Install]
WantedBy = multi-user.target

View file

@ -0,0 +1,32 @@
m /sys/class/graphics/fb0/mode 0666 kodi kodi - -
m /sys/class/graphics/fb0/blank 0666 kodi kodi - -
m /sys/class/graphics/fb0/free_scale 0666 kodi kodi - -
m /sys/class/graphics/fb0/free_scale_axis 0666 kodi kodi - -
m /sys/class/graphics/fb0/request2XScale 0666 kodi kodi - -
m /sys/class/graphics/fb0/scale_width 0666 kodi kodi - -
m /sys/class/graphics/fb0/scale_height 0666 kodi kodi - -
m /sys/class/graphics/fb1/blank 0666 kodi kodi - -
m /sys/class/graphics/fb1/scale_width 0666 kodi kodi - -
m /sys/class/graphics/fb1/scale_height 0666 kodi kodi - -
m /sys/class/graphics/fb1/free_scale 0666 kodi kodi - -
m /sys/class/graphics/fb1/scale 0666 kodi kodi - -
m /sys/class/graphics/fb1/scale_axis 0666 kodi kodi - -
m /sys/class/display/mode 0666 kodi kodi - -
m /sys/class/display/axis 0666 kodi kodi - -
m /sys/class/amhdmitx/amhdmitx0/disp_mode 0666 kodi kodi - -
m /sys/class/tsync/pts_pcrscr 0666 kodi kodi - -
m /sys/class/tsync/enable 0666 kodi kodi - -
m /sys/class/video/axis 0666 kodi kodi - -
m /sys/class/video/zoom 0666 kodi kodi - -
m /sys/class/video/contrast 0666 kodi kodi - -
m /sys/class/video/brightness 0666 kodi kodi - -
m /sys/class/video/saturation 0666 kodi kodi - -
m /sys/class/video/blackout_policy 0666 kodi kodi - -
m /sys/class/video/screen_mode 0666 kodi kodi - -
m /sys/class/video/disable_video 0666 kodi kodi - -
m /sys/class/audiodsp/digital_raw 0666 kodi kodi - -
m /sys/class/ppmgr/ppmgr_3d_mode 0666 kodi kodi - -
m /sys/class/ppmgr/ppscaler 0666 kodi kodi - -
m /sys/class/ppmgr/ppscaler_rect 0666 kodi kodi - -
m /sys/class/ppmgr/disp 0666 kodi kodi - -
m /sys/modules/di/parameters/bypass_all 0666 kodi kodi - -

View file

@ -0,0 +1,15 @@
polkit.addRule(function(action, subject) {
if (subject.user == "kodi") {
polkit.log("action=" + action);
polkit.log("subject=" + subject);
if (action.id.indexOf("org.freedesktop.login1.") == 0) {
return polkit.Result.YES;
}
if (action.id.indexOf("org.freedesktop.udisks.") == 0) {
return polkit.Result.YES;
}
if (action.id.indexOf("org.freedesktop.upower.") == 0) {
return polkit.Result.YES;
}
}
});