summaryrefslogtreecommitdiff
path: root/extra/gparted/PKGBUILD
blob: 3109c2cc4e85c52c88fd51c530428d8882aad6ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# $Id: PKGBUILD 141724 2011-11-02 15:23:08Z 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.10.0
pkgrel=1
pkgdesc="A Partition Magic clone, frontend to GNU Parted"
arch=('i686' 'x86_64' 'mips64el')
url="http://gparted.sourceforge.net"
license=('GPL')
depends=('parted' 'gtkmm' 'libsigc++')
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'
            '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"
        'org.archlinux.pkexec.gparted.policy')
md5sums=('d5b339eb5bef7a99ff73f750834b37b9'
         '27c264cfad8fa413d75954dda7a2dd50')

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"

  # 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
}