summaryrefslogtreecommitdiff
path: root/community/gsmartcontrol
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2013-03-14 16:10:04 +0100
committerMichał Masłowski <mtjm@mtjm.eu>2013-03-14 16:10:04 +0100
commit96f47f7059e8ad389d0aa757b2c66ad7cd8daf74 (patch)
treef107c3838373376ef130dcfcb5a980cf8ad30a5f /community/gsmartcontrol
parent40ece75655aebe0dd951a0489ed2111f1c27f8a8 (diff)
parent3ff20dedff636571ad0faa4736af5b23e4623ffe (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community/cantata/PKGBUILD community/gpsmanshp/PKGBUILD community/pigz/PKGBUILD extra/calligra/PKGBUILD extra/genius/PKGBUILD extra/gnumeric/PKGBUILD extra/goffice/PKGBUILD extra/graphicsmagick/PKGBUILD extra/libgphoto2/PKGBUILD extra/python-numpy/PKGBUILD
Diffstat (limited to 'community/gsmartcontrol')
-rw-r--r--community/gsmartcontrol/PKGBUILD33
-rw-r--r--community/gsmartcontrol/gsmartcontrol.install5
-rw-r--r--community/gsmartcontrol/org.archlinux.pkexec.gsmartcontrol.policy4
3 files changed, 27 insertions, 15 deletions
diff --git a/community/gsmartcontrol/PKGBUILD b/community/gsmartcontrol/PKGBUILD
index 3047069fd..9b557fac7 100644
--- a/community/gsmartcontrol/PKGBUILD
+++ b/community/gsmartcontrol/PKGBUILD
@@ -2,18 +2,18 @@
pkgname=gsmartcontrol
pkgver=0.8.7
-pkgrel=2
+pkgrel=3
pkgdesc="A graphical user interface for the smartctl hard disk drive health inspection tool."
arch=('i686' 'x86_64' 'mips64el')
url="http://gsmartcontrol.berlios.de/home/index.php/en/Home"
license=('GPL3')
-depends=('smartmontools' 'pcre' 'gtkmm' 'libglademm' 'glib2' 'xorg-xmessage')
-optdepends=('polkit: to run gparted directly from menu')
+depends=('smartmontools' 'gtkmm' 'xorg-xmessage' 'hicolor-icon-theme' 'polkit')
+optdepends=('polkit-gnome: to run gsmartcontrol directly from menu')
install=${pkgname}.install
-source=(http://download.berlios.de/gsmartcontrol/${pkgname}-${pkgver}.tar.bz2 org.archlinux.pkexec.gsmartcontrol.policy gsmartcontrol.desktop)
+source=(http://download.berlios.de/gsmartcontrol/${pkgname}-${pkgver}.tar.bz2
+ org.archlinux.pkexec.gsmartcontrol.policy)
md5sums=('6d104c2ffc1e693cd1a8052a6d7e3b30'
- 'e7b9380849cdcaa4356a42559ea7954f'
- '19b20293a639e51fa2abb929a3faae01')
+ 'e403f8e06e6b8a3d1a99da5e584b2257')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
@@ -31,11 +31,20 @@ package() {
make DESTDIR=${pkgdir} install
- # Install pexec fixed desktop file
- install -Dm755 $srcdir/gsmartcontrol.desktop $pkgdir/usr/share/applications/gsmartcontrol.desktop
+ # We need rename the original binary
+ mv "${pkgdir}/usr/bin/gsmartcontrol" "${pkgdir}/usr/bin/gsmartcontrol.elf"
- # Install pexec file
- install -Dm766 $srcdir/org.archlinux.pkexec.gsmartcontrol.policy \
- $pkgdir/usr/share/polkit-1/actions/org.archlinux.pkexec.gsmartcontrol.policy
+ # Install launcher script
+ echo '#!/bin/sh' > ${pkgdir}/usr/bin/gsmartcontrol
+ echo 'pkexec --disable-internal-agent "/usr/bin/gsmartcontrol.elf" "$@"' \
+ >> ${pkgdir}/usr/bin/gsmartcontrol
+ chmod 755 ${pkgdir}/usr/bin/gsmartcontrol
+
+ # Modify desktop file
+ sed -i -e "s|^Exec=.*|Exec=/usr/bin/gsmartcontrol|" \
+ "${pkgdir}/usr/share/applications/gsmartcontrol.desktop"
- }
+ # Install policy file
+ install -Dm766 $srcdir/org.archlinux.pkexec.gsmartcontrol.policy \
+ $pkgdir/usr/share/polkit-1/actions/org.archlinux.pkexec.gsmartcontrol.policy
+}
diff --git a/community/gsmartcontrol/gsmartcontrol.install b/community/gsmartcontrol/gsmartcontrol.install
index b95cc069d..f636406f2 100644
--- a/community/gsmartcontrol/gsmartcontrol.install
+++ b/community/gsmartcontrol/gsmartcontrol.install
@@ -1,9 +1,12 @@
post_install() {
which xdg-icon-resource 1>/dev/null 2>/dev/null && xdg-icon-resource forceupdate || true
+ echo 'If you use a lightweight windowmanager, remember to run'
+ echo '/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 to enable'
+ echo 'graphical authentication, which may be needed for pkexec to work.'
}
post_upgrade() {
- post_install $1
+ which xdg-icon-resource 1>/dev/null 2>/dev/null && xdg-icon-resource forceupdate || true
}
post_remove() {
diff --git a/community/gsmartcontrol/org.archlinux.pkexec.gsmartcontrol.policy b/community/gsmartcontrol/org.archlinux.pkexec.gsmartcontrol.policy
index fb985df87..b71db7904 100644
--- a/community/gsmartcontrol/org.archlinux.pkexec.gsmartcontrol.policy
+++ b/community/gsmartcontrol/org.archlinux.pkexec.gsmartcontrol.policy
@@ -5,14 +5,14 @@
<policyconfig>
<action id="org.archlinux.pkexec.gsmartcontrol">
- <message>Authentication is required to run the gsmartcontrol</message>
+ <message>Authentication is required to run the GSmartControl</message>
<icon_name>gsmartcontrol</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
- <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/gsmartcontrol</annotate>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/gsmartcontrol.elf</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>