[arch-commits] Commit in wifi-radar/trunk (3 files)
Balló György
bgyorgy at nymeria.archlinux.org
Sat Jan 11 21:33:22 UTC 2014
Date: Saturday, January 11, 2014 @ 22:33:22
Author: bgyorgy
Revision: 103823
upgpkg: wifi-radar 2.0.s08-8
Fix polkit support
Added:
wifi-radar/trunk/wifi-radar_polkit
Modified:
wifi-radar/trunk/PKGBUILD
wifi-radar/trunk/org.archlinux.pkexec.wifi-radar.policy
-------------------+
PKGBUILD | 31 +++++++++++++++++++++----------
wifi-radar_polkit | 6 ++++++
2 files changed, 27 insertions(+), 10 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-01-11 20:36:36 UTC (rev 103822)
+++ PKGBUILD 2014-01-11 21:33:22 UTC (rev 103823)
@@ -7,21 +7,23 @@
pkgname=wifi-radar
pkgver=2.0.s08
-pkgrel=7
+pkgrel=8
pkgdesc="A PyGTK2 utility for managing WiFi profiles"
arch=('any')
url="http://wifi-radar.berlios.de/"
license=('GPL')
depends=('net-tools' 'pygtk' 'wireless_tools')
-optdepends=('polkit-gnome: needed if you launch wifi-radar from menu')
+optdepends=('polkit: needed if you launch wifi-radar from menu')
backup=('etc/wifi-radar.conf')
source=(http://download.berlios.de/$pkgname/$pkgname-$pkgver.tar.bz2
- org.archlinux.pkexec.wifi-radar.policy)
+ org.archlinux.pkexec.wifi-radar.policy
+ wifi-radar_polkit)
md5sums=('cbad24805d5dc6696e38dc1df619c819'
- 'b66236233a5644a75e638ab6fdcc54fc')
+ '8a71c78f741fe0ec01929255c9edce28'
+ '7a3f018a1f163e4775b1a4e83bfcb593')
-build() {
- cd ${srcdir}/$pkgname-$pkgver
+prepare() {
+ cd "${srcdir}/$pkgname-$pkgver"
# python2 fix
sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $pkgname
@@ -34,10 +36,17 @@
-i -e 's|/sbin/dhcpcd|/usr/bin/dhcpcd|' \
-i -e 's|/usr/sbin/wpa_supplicant|/usr/bin/wpa_supplicant|' $pkgname
+ # Modify desktop file
+ sed -i -e "s/Exec=gksudo -S wifi-radar/Exec=wifi-radar_polkit/" $pkgname.desktop
+}
+
+build() {
+ cd "${srcdir}/$pkgname-$pkgver"
make
}
+
package() {
- cd ${srcdir}/$pkgname-$pkgver
+ cd "${srcdir}/$pkgname-$pkgver"
make DESTDIR="$pkgdir/usr" sysconfdir="$pkgdir/etc" sbindir="$pkgdir/usr/bin" install
# remove empty /etc dir
@@ -44,8 +53,10 @@
rmdir $pkgdir/etc
# Install policy file
- install -Dm644 "${srcdir}/org.archlinux.pkexec.wifi-radar.policy" "${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.wifi-radar.policy"
+ install -Dm644 "${srcdir}/org.archlinux.pkexec.wifi-radar.policy" \
+ "${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.wifi-radar.policy"
- # Modify desktop file
- sed -i -e "s/^Exec=.*/Exec=pkexec --disable-internal-agent wifi-radar/" "${pkgdir}/usr/share/applications/wifi-radar.desktop"
+ # Install launcher script
+ install -m755 "${srcdir}/wifi-radar_polkit" \
+ "${pkgdir}/usr/bin/wifi-radar_polkit"
}
Modified: org.archlinux.pkexec.wifi-radar.policy
===================================================================
(Binary files differ)
Added: wifi-radar_polkit
===================================================================
--- wifi-radar_polkit (rev 0)
+++ wifi-radar_polkit 2014-01-11 21:33:22 UTC (rev 103823)
@@ -0,0 +1,6 @@
+#!/bin/bash
+if [ $(which pkexec) ]; then
+ pkexec --disable-internal-agent "/usr/bin/wifi-radar" "$@"
+else
+ /usr/bin/wifi-radar "$@"
+fi
More information about the arch-commits
mailing list