alarm/kodi-odroid to 17.6-2 (#1665)

This commit is contained in:
Vlad Frolov 2019-02-03 21:29:07 +02:00 committed by Kevin Mihelich
parent 71a5b5646b
commit 9f7b1718c9
7 changed files with 307 additions and 83 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,140 +1,257 @@
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
# Maintainer: Oleg Rakhmanov <oleg@archlinuxarm.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# vim:set ts=2 sw=2 et:
# $Id$
# Maintainer: Vlad Frolov <frolvlad@gmail.com>
# Contributor: 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: 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: Vlad Frolov <frolvlad@gmail.com>
# Contributor: Jan Holthuis <holthuis dot jan at googlemail dot com>
# Contributor: Kevin Mihelich <kevin@archlinuxarm.org>
# Contributor: Oleg Rakhmanov <oleg@archlinuxarm.org>
#
# 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-odroid
pkgname=('kodi-odroid' 'kodi-odroid-eventclients')
_commit=094825c86d4995bef81419cd80dab0f2ed95eb79
pkgname=('kodi-odroid' 'kodi-odroid-eventclients' 'kodi-odroid-tools-texturepacker' 'kodi-odroid-dev')
_commit=7e7160eacdcb0c5b70e91dd4265d20358ba33c26
_codename=Krypton
pkgver=17.6
pkgrel=1
pkgrel=2
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' 'doxygen' 'glew'
'gperf' 'hicolor-icon-theme' 'jasper' 'java-runtime' 'libaacs' 'libass'
'libbluray' 'libcdio' 'odroid-libgl' 'libmariadbclient' 'libmicrohttpd'
'libbluray' 'libcdio' 'libcec' 'odroid-libgl' 'mariadb-libs' 'libmicrohttpd'
'libmodplug' 'libmpeg2' 'libnfs' 'libplist' 'libpulse' 'libssh' 'libva'
'libxrandr' 'libxslt' 'lzo' 'nasm' 'nss-mdns' 'python2-pillow'
'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' 'libcec'
'mesa'
)
_libdvdcss_commit="2f12236bc1c92f73c21e973363f79eb300de603f"
_libdvdnav_commit="981488f7f27554b103cca10c1fbeba027396c94a"
_libdvdread_commit="17d99db97e7b8f23077b342369d3c22a6250affd"
_ffmpeg_version="3.1.11-$_codename-17.5"
_crossguid_version="8f399e8bd4"
source=(
"$pkgbase-$pkgver-$_codename.tar.gz::https://github.com/Owersun/xbmc/archive/${_commit}.tar.gz"
"$pkgbase-libdvdcss-$_libdvdcss_commit.tar.gz::https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_commit.tar.gz"
"$pkgbase-libdvdnav-$_libdvdnav_commit.tar.gz::https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_commit.tar.gz"
"$pkgbase-libdvdread-$_libdvdread_commit.tar.gz::https://github.com/xbmc/libdvdread/archive/$_libdvdread_commit.tar.gz"
"$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz::https://github.com/xbmc/FFmpeg/archive/$_ffmpeg_version.tar.gz"
"http://mirrors.kodi.tv/build-deps/sources/crossguid-$_crossguid_version.tar.gz"
'fix-python-lib-path.patch'
'kodi_permissions.conf'
'kodi.service'
'polkit.rules'
'99-odroid.rules')
sha256sums=('aafe2852620a6bc62c929bf1bdb24760e7e9573787ca4dd37aceed2d1dbb32dd'
'b6eb2d929ff56cb051152c32010afc5e7cf5fe8c5ae32dca412a2b46b6b57e34'
'312b3d15bc448d24e92f4b2e7248409525eccc4e75776026d805478e51c5ef3d'
'e7179b2054163652596a56301c9f025515cb08c6d6310b42b897c3ad11c0199b'
'7df8bce40765b39de5766ca9d08b5b9ac1f498c65c805c989461b907cee6b7c0'
'3d77d09a5df0de510aeeb940df4cb534787ddff3bb1828779753f5dfa1229d10'
'1c07c9fdd8e2958262cf917e4266c4933fcd06529c111e3cb0cbaaa05c934033'
'8c606f29aa9ec90f4c93e1751cfd4000872937e604e6ad7538b96ba29612d2f6'
'831527f10a473211e3491846e71977d81121c9a50e9c35a2d20209aabe9b5a01'
'c68ed2bd377f80b606b8815d78239b9132b479eafc1d19797cee5824debe1800'
'5ddf80329c9f5d054525b45f788b3405d199bfc6cf5b08c543ad29766ec27f6e')
noextract=(
"$pkgbase-libdvdcss-$_libdvdcss_commit.tar.gz"
"$pkgbase-libdvdnav-$_libdvdnav_commit.tar.gz"
"$pkgbase-libdvdread-$_libdvdread_commit.tar.gz"
"$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz"
"crossguid-$_crossguid_version.tar.gz"
)
source=("https://github.com/Owersun/xbmc/archive/${_commit}.tar.gz")
sha256sums=('d155f760cfa8ba2e89c4ff906c18a027bf80fd83477d3bcd523f8152a23e9c98')
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
cd "xbmc-$_commit"
patch -p1 -i "$srcdir/fix-python-lib-path.patch"
}
build() {
cd xbmc-${_commit}
LIBCROSSGUID_ROOT="$(pwd)/tools/depends/target/crossguid"
make -C tools/depends/target/crossguid "PREFIX=$LIBCROSSGUID_ROOT"
CPPFLAGS+=" -I$LIBCROSSGUID_ROOT/include"
LDFLAGS+=" -L/usr/lib/mali-egl -L$LIBCROSSGUID_ROOT/lib -I$LIBCROSSGUID_ROOT/include"
# Bootstrapping
MAKEFLAGS=-j1 ./bootstrap
# 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-gl \
--disable-openmax \
--disable-static --enable-shared \
--disable-rsxs \
--enable-gles \
--enable-codec=mfc
# 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_MFC=ON \
-DENABLE_OPENGL=OFF \
-DENABLE_OPENGLES=ON \
-DENABLE_PULSEAUDIO=OFF \
-DENABLE_VAAPI=OFF \
-DENABLE_VDPAU=OFF \
-DENABLE_X11=ON \
-Dlibdvdcss_URL="$srcdir/$pkgbase-libdvdcss-$_libdvdcss_commit.tar.gz" \
-Dlibdvdnav_URL="$srcdir/$pkgbase-libdvdnav-$_libdvdnav_commit.tar.gz" \
-Dlibdvdread_URL="$srcdir/$pkgbase-libdvdread-$_libdvdread_commit.tar.gz" \
-DFFMPEG_URL="$srcdir/$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz" \
-DCROSSGUID_URL="$srcdir/crossguid-$_crossguid_version.tar.gz" \
-DENABLE_INTERNAL_CROSSGUID=ON \
../"xbmc-$_commit"/project/cmake
make
make preinstall
}
# kodi
# components: kodi, kodi-bin
package_kodi-odroid() {
pkgdesc="A software media player and entertainment hub for digital media (ODROID-X/X2/U2/U3)"
# 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-libgl' 'mesa' 'libdcadec.so'
'python2-pillow' 'python2-simplejson' 'xorg-xdpyinfo' 'bluez-libs'
'fribidi' 'freetype2' 'glew' 'hicolor-icon-theme' 'libcdio' 'libjpeg-turbo'
'mariadb-libs' 'libmicrohttpd' 'libpulse' 'libssh' 'libva' 'libvdpau'
'libxrandr' 'libxslt' 'lzo' 'smbclient' 'taglib' 'tinyxml' 'yajl' 'mesa'
'desktop-file-utils'
'odroid-libgl'
)
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'
'libcec: CEC (Consumer Electronics Control) allows to control devices over HDMI port'
'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-odroid-eventclients() {
pkgdesc="Kodi Event Clients (ODROID-X/X2/U2/U3)"
provides=('kodi-eventclients')
conflicts=('kodi-eventclients')
depends=('cwiid')
cd ${srcdir}/xbmc-${_commit}
_components=(
'kodi-eventclients-common'
'kodi-eventclients-ps3'
'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-odroid-tools-texturepacker() {
pkgdesc="Kodi Texturepacker tool (ODROID-X/X2/U2/U3)"
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-odroid-dev() {
pkgdesc="Kodi dev files (ODROID-X/X2/U2/U3)"
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

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,17 @@
[Unit]
Description=Kodi for Odroid
After=systemd-user-sessions.service network-online.target sound.target mysqld.service
Requires=network-online.target
Conflicts=getty@tty1.service
[Service]
User=kodi
Group=kodi
PAMName=login
TTYPath=/dev/tty1
ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -nolisten tcp vt1
Restart=on-abort
StandardInput=tty
[Install]
WantedBy=graphical.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;
}
}
});