gsmartcontrol: added policykit support for desktop menu launcher.
This commit is contained in:
parent
8ca6fec389
commit
df32c8156f
4 changed files with 40 additions and 2 deletions
4
srcpkgs/gsmartcontrol/INSTALL.msg
Normal file
4
srcpkgs/gsmartcontrol/INSTALL.msg
Normal file
|
@ -0,0 +1,4 @@
|
|||
To run gsmartcontrol through a desktop menu, a polkit authentication agent
|
||||
must be running; for GNOME and KDE users it should be already installed,
|
||||
otherwise you can install *lxpolkit* which is a lightweight polkit
|
||||
authentication agent.
|
4
srcpkgs/gsmartcontrol/files/gsmartcontrol-pkexec
Executable file
4
srcpkgs/gsmartcontrol/files/gsmartcontrol-pkexec
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
pkexec --disable-internal-agent "/usr/bin/gsmartcontrol" "$@"
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
|
||||
<action id="org.void.pkexec.gsmartcontrol">
|
||||
<message>Authentication is required to run 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.allow_gui">true</annotate>
|
||||
</action>
|
||||
|
||||
</policyconfig>
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'gsmartcontrol'
|
||||
pkgname=gsmartcontrol
|
||||
version=0.8.7
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=gnu-configure
|
||||
hostmakedepends="pkg-config"
|
||||
makedepends="gtkmm2-devel pcre-devel desktop-file-utils"
|
||||
|
@ -17,5 +17,16 @@ CXXFLAGS="-std=c++11"
|
|||
|
||||
post_install() {
|
||||
# license files uneeded
|
||||
rm -f ${PKGDESTDIR}/usr/share/doc/${pkgname}/LICENSE_*
|
||||
rm -f ${DESTDIR}/usr/share/doc/${pkgname}/LICENSE_*
|
||||
|
||||
# PolicyKit support
|
||||
vinstall ${FILESDIR}/org.void.pkexec.gsmartcontrol.policy 644 /usr/share/polkit-1/actions
|
||||
vbin ${FILESDIR}/gsmartcontrol-pkexec
|
||||
|
||||
sed -i "s|^Exec=.*|Exec="/usr/bin/gsmartcontrol-pkexec"|" \
|
||||
${DESTDIR}/usr/share/applications/gsmartcontrol.desktop
|
||||
|
||||
# no more need of gsmartcontrol-root since polkit
|
||||
rm -f ${DESTDIR}/usr/bin/${pkgname}-root
|
||||
rm -f ${DESTDIR}/usr/share/man/man1/gsmartcontrol-root.1
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue