summaryrefslogtreecommitdiff
path: root/libre/xbmc-libre
diff options
context:
space:
mode:
Diffstat (limited to 'libre/xbmc-libre')
-rw-r--r--libre/xbmc-libre/PKGBUILD12
-rw-r--r--libre/xbmc-libre/polkit.rules19
-rw-r--r--libre/xbmc-libre/xbmc.install11
3 files changed, 22 insertions, 20 deletions
diff --git a/libre/xbmc-libre/PKGBUILD b/libre/xbmc-libre/PKGBUILD
index 17917185e..7055b9d4f 100644
--- a/libre/xbmc-libre/PKGBUILD
+++ b/libre/xbmc-libre/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 103998 2014-01-14 14:56:47Z spupykin $
+# $Id: PKGBUILD 104461 2014-01-21 08:35:40Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
@@ -11,7 +11,7 @@ _pkgname=xbmc
pkgname=xbmc-libre
pkgver=12.3
_codename=Frodo
-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"
@@ -27,7 +27,7 @@ makedepends=('boost' 'cmake' 'gperf' 'nasm' 'libxinerama' 'zip' 'libvdpau' 'libc
optdepends=('libcec: support for Pulse-Eight USB-CEC adapter'
'lirc-libre: remote controller support'
'udisks: automount external drives'
- 'upower: used to trigger suspend functionality'
+ 'upower: used to trigger power management functionality'
'libarchive: access compressed files without unpacking them'
'xorg-xinit: autostart xbmc')
install="${_pkgname}.install"
@@ -40,7 +40,7 @@ source=("http://mirrors.xbmc.org/releases/source/xbmc-$pkgver.tar.gz"
"libass.patch::https://bugs.archlinux.org/index.php?getfile=11285")
md5sums=('7ae385ebf8e5cfcb917393235e6efbdb'
'8312d6d4ac5d7c3d9eed40ab08a17d3b'
- 'd4cbb6609c8e7b713c714241f529000e'
+ '02f7951824ee13103344f36009c0ef2a'
'7fd6399d2ffbdf06b724f0cc2efa0784')
prepare() {
@@ -121,7 +121,7 @@ package() {
done
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
- chmod 0700 $pkgdir/etc/polkit-1/rules.d/
+ install -Dm0644 $srcdir/polkit.rules $pkgdir/usr/share/polkit-1/rules.d/10-xbmc.rules
+ chmod 0700 $pkgdir/usr/share/polkit-1/rules.d/
}
# vim:set ts=2 sw=2 et:
diff --git a/libre/xbmc-libre/polkit.rules b/libre/xbmc-libre/polkit.rules
index 5bc7e69f5..4b6d0fda0 100644
--- a/libre/xbmc-libre/polkit.rules
+++ b/libre/xbmc-libre/polkit.rules
@@ -1,11 +1,12 @@
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;
- }
+ if (subject.user == "xbmc") {
+ 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;
+ }
+ }
});
diff --git a/libre/xbmc-libre/xbmc.install b/libre/xbmc-libre/xbmc.install
index 04396af45..7fc45751a 100644
--- a/libre/xbmc-libre/xbmc.install
+++ b/libre/xbmc-libre/xbmc.install
@@ -1,10 +1,10 @@
post_install() {
[[ $(type -p gtk-update-icon-cache) ]] && usr/bin/gtk-update-icon-cache -qtf usr/share/icons/hicolor
[[ $(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
+ getent group xbmc > /dev/null || groupadd -r xbmc
+ getent passwd xbmc > /dev/null || useradd -r -m -d /var/lib/xbmc -g xbmc xbmc
usermod -a -G xbmc,audio,video,power,network,optical,storage,disk xbmc
- chown -R 102:0 etc/polkit-1
+ chown -R xbmc:xbmc var/lib/xbmc
}
post_upgrade() {
@@ -12,6 +12,7 @@ post_upgrade() {
}
post_remove() {
- post_install $1
- echo "You may want to remove xbmc user and group"
+ [[ $(type -p gtk-update-icon-cache) ]] && usr/bin/gtk-update-icon-cache -qtf usr/share/icons/hicolor
+ [[ $(type -p update-desktop-database) ]] && usr/bin/update-desktop-database -q usr/share/applications
+ getent passwd xbmc > /dev/null || userdel xbmc
}