From 8e372cc6207b56516c1facdaeb92d15c4716d8a2 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 9 Oct 2011 23:14:34 +0000 Subject: Sun Oct 9 23:14:34 UTC 2011 --- extra/gparted/PKGBUILD | 28 +++++++++++++++++------ extra/gparted/org.archlinux.pkexec.gparted.policy | 20 ++++++++++++++++ 2 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 extra/gparted/org.archlinux.pkexec.gparted.policy (limited to 'extra/gparted') 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 # Contributor: Andrew Simmons +# Contributor: György Balló 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 @@ + + + + + + Authentication is required to run the GParted Partition Editor + gparted + + auth_admin + auth_admin + auth_admin + + /usr/sbin/gparted + true + + + + -- cgit v1.2.3-54-g00ecf