# $Id: PKGBUILD 241583 2015-06-30 21:00:07Z heftig $
# Maintainer: Ionut Biru <ibiru@archlinux.org>

pkgname=udisks2
pkgver=2.1.6
pkgrel=1
pkgdesc="Disk Management Service, version 2"
arch=('i686' 'x86_64')
url="http://www.freedesktop.org/wiki/Software/udisks"
license=('GPL2')
depends=('glib2' 'systemd' 'polkit' 'libatasmart' 'util-linux' 'libgudev')
makedepends=('intltool' 'docbook-xsl' 'gobject-introspection' 'python2')
optdepends=('parted: partition management'
            'gptfdisk: GUID partition table support'
            'ntfs-3g: NTFS filesystem management support'
            'dosfstools: VFAT filesystem management support')
source=(http://udisks.freedesktop.org/releases/udisks-$pkgver.tar.bz2{,.sign})
sha256sums=('dec5f5c85fa0f74f39336acbfba1770f9988c096be23873714543c304b09f46a'
            'SKIP')
validpgpkeys=('3DB46B55EFA59D40E6232148D14EF15DAFE11347')  # Martin Pitt

build() {
  cd udisks-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc \
      --sbindir=/usr/bin --libexecdir=/usr/lib \
      --with-systemdsystemunitdir=/usr/lib/systemd/system \
      --localstatedir=/var --disable-static
  make
}

check() {
  cd udisks-$pkgver
  make check
}

package() {
  cd udisks-$pkgver
  make DESTDIR="$pkgdir" install \
    bash_completiondir=/usr/share/bash-completion/completions
}
