enable xbmc to restart/shutdown the system

This commit is contained in:
Andras Biro 2014-04-30 00:55:15 +02:00
parent 578d1cc2d6
commit 0256f62c6f
2 changed files with 19 additions and 6 deletions

View file

@ -0,0 +1,11 @@
polkit.addRule(function(action, subject) {
if (action.id.match("org.freedesktop.login1.") && subject.isInGroup("power")) {
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.udisks") == 0 && subject.isInGroup("storage")) {
return polkit.Result.YES;
}
});

View file

@ -7,17 +7,16 @@ buildarch=4
pkgname=xbmc-imx-git pkgname=xbmc-imx-git
pkgver=13.20140609 pkgver=13.20140609
pkgrel=1 pkgrel=2
pkgdesc="A software media player and entertainment hub for digital media for select imx6 systems" pkgdesc="A software media player and entertainment hub for digital media for select imx6 systems"
arch=('armv7h') arch=('armv7h')
url="http://xbmc.org" url="http://xbmc.org"
license=('GPL' 'custom') license=('GPL' 'custom')
depends=('fribidi' 'lzo2' 'smbclient' 'libtiff' 'libpng' 'libcdio' 'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd' 'sdl_image' 'python2' 'libass' 'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'libbluray' 'libnfs' 'afpfs-ng' 'libshairport' 'avahi' 'bluez-libs' 'tinyxml' 'libplist' 'swig' 'taglib' 'libxslt' 'libfslvpuwrap' 'gpu-viv-bin-mx6q-fb' 'libcec-imx6' 'firmware-imx') depends=('fribidi' 'lzo2' 'smbclient' 'libtiff' 'libpng' 'libcdio' 'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd' 'sdl_image' 'python2' 'libass' 'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'libbluray' 'libnfs' 'afpfs-ng' 'libshairport' 'avahi' 'bluez-libs' 'tinyxml' 'libplist' 'swig' 'taglib' 'libxslt' 'libfslvpuwrap' 'gpu-viv-bin-mx6q-fb' 'libcec-imx6' 'firmware-imx')
makedepends=('boost' 'cmake' 'gperf' 'nasm' 'zip' 'udisks' 'upower' 'git' 'autoconf' 'java-runtime-headless' 'linux-headers-imx6-fsl') makedepends=('boost' 'cmake' 'gperf' 'nasm' 'zip' 'udisks' 'git' 'autoconf' 'java-runtime-headless' 'linux-headers-imx6-fsl')
optdepends=( optdepends=(
'lirc: remote controller support' 'lirc: remote controller support'
'udisks: automount external drives' 'udisks: automount external drives'
'upower: used to trigger suspend functionality'
'unrar: access compressed files without unpacking them' 'unrar: access compressed files without unpacking them'
) )
provides=("xbmc") provides=("xbmc")
@ -25,11 +24,13 @@ conflicts=("xbmc")
install="xbmc.install" install="xbmc.install"
source=('xbmc.service' source=('xbmc.service'
'runxbmc' 'runxbmc'
'xbmc.conf') 'xbmc.conf'
'10-xbmc.rules')
md5sums=('07096dfd530cc432fa6073ee1a32e7f6' md5sums=('07096dfd530cc432fa6073ee1a32e7f6'
'730ac095a89b05c3c2cf2dd93947cb5c' '730ac095a89b05c3c2cf2dd93947cb5c'
'8fab4cc5cac44a7090ca7e839e326ec8') '8fab4cc5cac44a7090ca7e839e326ec8'
'1cbf21efa5fef760e1651115d475faf9')
# master branch of xbmc-imx6 organization. Modified by Stephan "wolgar" Rafin, Chris "koying" Browet, Rudi "rudi-warped" Ihle and smallint # master branch of xbmc-imx6 organization. Modified by Stephan "wolgar" Rafin, Chris "koying" Browet, Rudi "rudi-warped" Ihle and smallint
_gitname="xbmc" _gitname="xbmc"
@ -119,7 +120,8 @@ package() {
install -Dm0644 $srcdir/xbmc.service $pkgdir/usr/lib/systemd/system/xbmc.service install -Dm0644 $srcdir/xbmc.service $pkgdir/usr/lib/systemd/system/xbmc.service
install -Dm0755 $srcdir/runxbmc $pkgdir/usr/bin/runxbmc install -Dm0755 $srcdir/runxbmc $pkgdir/usr/bin/runxbmc
install -Dm0644 $srcdir/xbmc.conf $pkgdir/etc/tmpfiles.d/xbmc.conf install -Dm0644 $srcdir/xbmc.conf $pkgdir/etc/tmpfiles.d/xbmc.conf
install -Dm0644 $srcdir/10-xbmc.rules $pkgdir/etc/polkit-1/rules.d/10-xbmc.rules
chmod 700 $pkgdir/etc/polkit-1/rules.d
} }