summaryrefslogtreecommitdiff
path: root/extra/gparted
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-10-09 23:14:34 +0000
committerroot <root@rshg054.dnsready.net>2011-10-09 23:14:34 +0000
commit8e372cc6207b56516c1facdaeb92d15c4716d8a2 (patch)
tree5958b5f5b22ce68cbfd3c1a1007544403b44834e /extra/gparted
parent40e90a19618851856689ef8697391d37ec6841a1 (diff)
Sun Oct 9 23:14:34 UTC 2011
Diffstat (limited to 'extra/gparted')
-rw-r--r--extra/gparted/PKGBUILD28
-rw-r--r--extra/gparted/org.archlinux.pkexec.gparted.policy20
2 files changed, 41 insertions, 7 deletions
diff --git a/extra/gparted/PKGBUILD b/extra/gparted/PKGBUILD
index dca866a42..41b848763 100644
--- a/extra/gparted/PKGBUILD
+++ b/extra/gparted/PKGBUILD
@@ -1,27 +1,30 @@
-# $Id: PKGBUILD 139177 2011-10-01 06:10:22Z giovanni $
+# $Id: PKGBUILD 140162 2011-10-08 07:31:59Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Andrew Simmons <andrew.simmons@gmail.com>
+# Contributor: György Balló <ballogy@freestart.hu>
pkgname=gparted
pkgver=0.9.1
-pkgrel=2
+pkgrel=3
pkgdesc="A Partition Magic clone, frontend to GNU Parted"
arch=('i686' 'x86_64')
url="http://gparted.sourceforge.net"
license=('GPL')
depends=('parted' 'gtkmm' 'libsigc++')
-makedepends=('intltool' 'pkgconfig' 'gnome-doc-utils')
+makedepends=('intltool' 'pkg-config' 'gnome-doc-utils')
optdepends=('dosfstools: for FAT16 and FAT32 partitions'
'jfsutils: for jfs partitions'
'ntfsprogs: for ntfs partitions'
'reiserfsprogs: for reiser partitions'
'xfsprogs: for xfs partitions'
- 'gksu: to run gparted directly from menu'
+ 'polkit: to run gparted directly from menu'
'gpart: for recovering corrupt partition tables'
'mtools')
install=gparted.install
-source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('f35785099994c7c9b7b2e842840f8b72')
+source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.bz2"
+ 'org.archlinux.pkexec.gparted.policy')
+md5sums=('f35785099994c7c9b7b2e842840f8b72'
+ '27c264cfad8fa413d75954dda7a2dd50')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -34,5 +37,16 @@ package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
- sed -i -e "s:Exec= /usr/sbin:Exec=gksu /usr/sbin:g" ${pkgdir}/usr/share/applications/gparted.desktop
+
+ # Install policy file
+ install -Dm644 "${srcdir}/org.archlinux.pkexec.gparted.policy" "${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.gparted.policy"
+
+ # Install launcher script
+ mkdir -p ${pkgdir}/usr/bin
+ echo '#!/bin/sh' > ${pkgdir}/usr/bin/gparted-pkexec
+ echo 'pkexec "/usr/sbin/gparted" "$@"' >> ${pkgdir}/usr/bin/gparted-pkexec
+ chmod 755 ${pkgdir}/usr/bin/gparted-pkexec
+
+ # Modify desktop file
+ sed -i -e "s/Exec=.*/Exec=gparted-pkexec/" ${pkgdir}/usr/share/applications/gparted.desktop
}
diff --git a/extra/gparted/org.archlinux.pkexec.gparted.policy b/extra/gparted/org.archlinux.pkexec.gparted.policy
new file mode 100644
index 000000000..561cd7d1e
--- /dev/null
+++ b/extra/gparted/org.archlinux.pkexec.gparted.policy
@@ -0,0 +1,20 @@
+<?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.archlinux.pkexec.gparted">
+ <message>Authentication is required to run the GParted Partition Editor</message>
+ <icon_name>gparted</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/sbin/gparted</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+
+</policyconfig>
+