# $Id: PKGBUILD 179753 2013-03-09 17:23:03Z giovanni $ # Maintainer: Giovanni Scafora # Contributor: Andrew Simmons # Contributor: György Balló pkgname=gparted pkgver=0.14.1 pkgrel=4 pkgdesc="A Partition Magic clone, frontend to GNU Parted" arch=('i686' 'x86_64') url="http://gparted.sourceforge.net" license=('GPL') depends=('parted' 'gtkmm' 'hicolor-icon-theme' 'polkit-gnome') makedepends=('intltool' 'pkg-config' 'gnome-doc-utils') optdepends=('dosfstools: for FAT16 and FAT32 partitions' 'jfsutils: for jfs partitions' 'ntfs-3g: for ntfs partitions' 'reiserfsprogs: for reiser partitions' 'xfsprogs: for xfs partitions' 'nilfs-utils: for nilfs2 support' 'gpart: for recovering corrupt partition tables' 'mtools: utilities to access MS-DOS disks') install=gparted.install source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.bz2" 'org.archlinux.pkexec.gparted.policy') md5sums=('1ffe859c70e102a776dffb1ff0a2164a' 'c031d7d2b845ccb025b9f83e0ddd5653') build() { cd "${srcdir}/${pkgname}-${pkgver}" ./configure --prefix=/usr make } package() { cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="${pkgdir}" install # Install policy file install -Dm644 "${srcdir}/org.archlinux.pkexec.gparted.policy" "${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.gparted.policy" # We need rename the original script mv "${pkgdir}/usr/sbin/gparted" "${pkgdir}/usr/sbin/gparted.elf" # Install launcher script echo '#!/bin/sh' > ${pkgdir}/usr/sbin/gparted echo 'pkexec "/usr/sbin/gparted.elf" "$@"' >> ${pkgdir}/usr/sbin/gparted chmod 755 ${pkgdir}/usr/sbin/gparted # Modify desktop file sed -i -e "s|^Exec=.*|Exec=pkexec --disable-internal-agent /usr/sbin/gparted.elf|" "${pkgdir}/usr/share/applications/gparted.desktop" }