summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2013-11-28 17:38:20 -0200
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2013-11-28 17:38:20 -0200
commit6e032163d864e969926dd85e0b68719a855658c6 (patch)
tree1c193ef41299300673462cd0a6e4c855b97b9293
parente460381fc8da44132a93b65aacc234fcd43b6d1e (diff)
xbmc-libre-12.2-7: add polkit.rules
-rw-r--r--libre/xbmc-libre/PKGBUILD12
-rw-r--r--libre/xbmc-libre/polkit.rules11
-rw-r--r--libre/xbmc-libre/xbmc.install2
-rw-r--r--libre/xbmc-libre/xbmc.service4
4 files changed, 21 insertions, 8 deletions
diff --git a/libre/xbmc-libre/PKGBUILD b/libre/xbmc-libre/PKGBUILD
index 23d389d52..a251e5de5 100644
--- a/libre/xbmc-libre/PKGBUILD
+++ b/libre/xbmc-libre/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 100487 2013-11-05 08:57:03Z bpiotrowski $
+# $Id: PKGBUILD 101586 2013-11-28 11:19:57Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
@@ -10,7 +10,7 @@ _prefix=/usr
_pkgname=xbmc
pkgname=xbmc-libre
pkgver=12.2
-pkgrel=6
+pkgrel=7
pkgdesc="A software media player and entertainment hub for digital media, with libarchive recommendation"
arch=('i686' 'x86_64')
url="http://xbmc.org"
@@ -35,9 +35,11 @@ replaces=$_pkgname
conflicts=$_pkgname
provides=$_pkgname=$pkgver
source=("http://mirrors.xbmc.org/releases/source/xbmc-$pkgver.tar.gz"
- "xbmc.service")
+ "xbmc.service"
+ "polkit.rules")
md5sums=('489f3877decae4e265ece54f9eaef0ba'
- '76fae229ebc3bcfaab7e7f27e4fb51f5')
+ '8312d6d4ac5d7c3d9eed40ab08a17d3b'
+ 'd4cbb6609c8e7b713c714241f529000e')
build() {
cd "${srcdir}/xbmc-$pkgver"
@@ -110,7 +112,7 @@ package() {
mv "${pkgdir}${_prefix}/share/doc/xbmc/${licensef}" "${pkgdir}${_prefix}/share/licenses/${_pkgname}"
done
- # systemd stuff
install -Dm0644 $srcdir/xbmc.service $pkgdir/usr/lib/systemd/system/xbmc.service
+ install -Dm0644 $srcdir/polkit.rules $pkgdir/etc/polkit-1/rules.d/10-xbmc.rules
}
# vim:set ts=2 sw=2 et:
diff --git a/libre/xbmc-libre/polkit.rules b/libre/xbmc-libre/polkit.rules
new file mode 100644
index 000000000..5bc7e69f5
--- /dev/null
+++ b/libre/xbmc-libre/polkit.rules
@@ -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;
+ }
+});
diff --git a/libre/xbmc-libre/xbmc.install b/libre/xbmc-libre/xbmc.install
index b104b33e8..0947fcf0c 100644
--- a/libre/xbmc-libre/xbmc.install
+++ b/libre/xbmc-libre/xbmc.install
@@ -3,7 +3,7 @@ post_install() {
[[ $(type -p update-desktop-database) ]] && usr/bin/update-desktop-database -q usr/share/applications
getent group xbmc > /dev/null || groupadd xbmc
getent passwd xbmc > /dev/null || useradd -m -d /var/lib/xbmc -g xbmc xbmc
- usermod -a -G xbmc,audio,video,power,network,optical,storage,disk xbmc
+ usermod -a -G xbmc,audio,video,power,network,optical,storage,disk,upower,udisks xbmc
}
post_upgrade() {
diff --git a/libre/xbmc-libre/xbmc.service b/libre/xbmc-libre/xbmc.service
index 431582f1b..b6430e255 100644
--- a/libre/xbmc-libre/xbmc.service
+++ b/libre/xbmc-libre/xbmc.service
@@ -6,8 +6,8 @@ After = remote-fs.target
User = xbmc
Group = xbmc
Type = simple
-ExecStart = /usr/bin/xinit /usr/bin/xbmc-standalone -- :0 -nolisten tcp
-Restart = always
+ExecStart = /usr/bin/xinit /usr/bin/xbmc-standalone -l /run/lirc/lircd -- :0 -nolisten tcp
+Restart = on-abort
[Install]
WantedBy = multi-user.target