mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-27 23:44:04 +00:00
add alarm/kodi-c2-17.0rc2 (#1428)
This commit is contained in:
parent
2fac05f89d
commit
d43c636da9
6 changed files with 234 additions and 0 deletions
8
alarm/kodi-c2/99-odroid.rules
Normal file
8
alarm/kodi-c2/99-odroid.rules
Normal 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"
|
143
alarm/kodi-c2/PKGBUILD
Normal file
143
alarm/kodi-c2/PKGBUILD
Normal file
|
@ -0,0 +1,143 @@
|
|||
# Maintainer: Adrian Fedoreanu <adrian.fedoreanu@gmail.com>
|
||||
|
||||
buildarch=8
|
||||
|
||||
_prefix=/usr
|
||||
|
||||
pkgbase=kodi-c2
|
||||
pkgname=('kodi-c2' 'kodi-c2-eventclients')
|
||||
_commit=c695b8ab9ab93120ac3f5ab952bcbf28cbcce959
|
||||
pkgver=17.0rc2
|
||||
pkgrel=1
|
||||
arch=('aarch64')
|
||||
url="http://kodi.tv"
|
||||
license=('GPL2')
|
||||
makedepends=(
|
||||
'afpfs-ng' 'bluez-libs' 'boost' 'cmake' 'curl' 'cwiid' 'doxygen' 'git' 'glew'
|
||||
'gperf' 'hicolor-icon-theme' 'jasper' 'java-runtime' 'libaacs' 'libass'
|
||||
'libbluray' 'libcdio' 'odroid-c2-libgl-fb' 'odroid-c2-libgl-headers'
|
||||
'libmariadbclient' 'libmicrohttpd' 'libmodplug' 'libmpeg2' 'libnfs'
|
||||
'libplist' 'libpulse' 'libssh' 'libva' 'mesa' 'libcrossguid' 'libcec'
|
||||
'libxslt' 'lzo' 'nasm' 'nss-mdns' 'python2-pillow' 'aml-libs-c2'
|
||||
'python2-pybluez' 'python2-simplejson' 'rtmpdump' 'sdl2' 'sdl_image'
|
||||
'shairplay' 'smbclient' 'swig' 'taglib' 'tinyxml' 'unzip' 'upower' 'yajl' 'zip'
|
||||
)
|
||||
|
||||
source=("https://github.com/phedoreanu/xbmc/archive/${_commit}.tar.gz"
|
||||
'kodi_permissions.conf'
|
||||
'kodi.service'
|
||||
'polkit.rules'
|
||||
'99-odroid.rules')
|
||||
sha256sums=('2f26c0a4de2abcc5171a6a75219fd0333d85498a0fa1df9d164b0b8b63e8fbc6'
|
||||
'8c606f29aa9ec90f4c93e1751cfd4000872937e604e6ad7538b96ba29612d2f6'
|
||||
'79aa17b475967d97b6c72c850b638705d6feb6d995844476b65d68d33d161114'
|
||||
'c68ed2bd377f80b606b8815d78239b9132b479eafc1d19797cee5824debe1800'
|
||||
'5ddf80329c9f5d054525b45f788b3405d199bfc6cf5b08c543ad29766ec27f6e')
|
||||
|
||||
prepare() {
|
||||
cd xbmc-${_commit}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
build() {
|
||||
cd xbmc-${_commit}
|
||||
|
||||
# https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html
|
||||
CFLAGS=`echo "$CFLAGS -I/usr/include/{ump,umplock} -mcpu=cortex-a53+crc -mtune=cortex-a53 -mabi=lp64"` && CXXFLAGS="$CFLAGS"
|
||||
LDFLAGS+=" -L/usr/lib/mali-egl -L/usr/lib/aml_libs"
|
||||
|
||||
# Bootstrapping
|
||||
MAKEFLAGS=-j`nproc` ./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 \
|
||||
--with-lirc-device=/run/lirc/lircd \
|
||||
--disable-static --enable-shared \
|
||||
--disable-vaapi \
|
||||
--disable-vdpau \
|
||||
--disable-openmax \
|
||||
--disable-gl \
|
||||
--disable-x11 \
|
||||
--enable-gles \
|
||||
--enable-codec=amcodec
|
||||
|
||||
# Now (finally) build
|
||||
make -j`nproc`
|
||||
}
|
||||
|
||||
package_kodi-c2() {
|
||||
pkgdesc="A software media player and entertainment hub for digital media (ODROID-C2)"
|
||||
|
||||
# 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-c2-libgl-fb' 'aml-libs-c2' 'mesa'
|
||||
)
|
||||
optdepends=(
|
||||
'afpfs-ng: Apple shares support'
|
||||
'bluez: Blutooth support'
|
||||
'libnfs: NFS shares support'
|
||||
'libplist: AirPlay support'
|
||||
'lirc: Remote controller support'
|
||||
'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')
|
||||
replaces=('xbmc')
|
||||
|
||||
cd xbmc-${_commit}
|
||||
# Running make install
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
# Licenses
|
||||
install -dm755 ${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_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
|
||||
}
|
||||
|
||||
package_kodi-c2-eventclients() {
|
||||
pkgdesc="Kodi Event Clients (ODROID-C2)"
|
||||
provides=('kodi-eventclients')
|
||||
conflicts=('kodi-eventclients')
|
||||
depends=('cwiid')
|
||||
|
||||
cd ${srcdir}/xbmc-${_commit}
|
||||
|
||||
make DESTDIR="$pkgdir" eventclients WII_EXTRA_OPTS=-DCWIID_OLD
|
||||
|
||||
install -dm755 "$pkgdir/usr/lib/python2.7/$pkgbase"
|
||||
mv "$pkgdir/kodi"/* "$pkgdir/usr/lib/python2.7/$pkgbase"
|
||||
rmdir "$pkgdir/kodi"
|
||||
}
|
23
alarm/kodi-c2/kodi.install
Normal file
23
alarm/kodi-c2/kodi.install
Normal file
|
@ -0,0 +1,23 @@
|
|||
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() {
|
||||
post_install $1
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
update_icons
|
||||
getent passwd kodi > /dev/null && userdel kodi
|
||||
}
|
||||
|
||||
update_icons() {
|
||||
type -p gtk-update-icon-cache > /dev/null 2>&1 && usr/bin/gtk-update-icon-cache -qtf usr/share/icons/hicolor
|
||||
type -p update-desktop-database > /dev/null 2>&1 && usr/bin/update-desktop-database -q usr/share/applications
|
||||
return 0
|
||||
}
|
13
alarm/kodi-c2/kodi.service
Normal file
13
alarm/kodi-c2/kodi.service
Normal 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
|
32
alarm/kodi-c2/kodi_permissions.conf
Normal file
32
alarm/kodi-c2/kodi_permissions.conf
Normal 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 - -
|
15
alarm/kodi-c2/polkit.rules
Normal file
15
alarm/kodi-c2/polkit.rules
Normal 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;
|
||||
}
|
||||
}
|
||||
});
|
Loading…
Reference in a new issue