# $Id$
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Contributor: Roman Kyrylych <roman@archlinux.org>

pkgname=gnome-bluetooth
pkgver=3.8.0
pkgrel=2
pkgdesc="The GNOME Bluetooth Subsystem"
arch=('i686' 'x86_64')
url="http://live.gnome.org/GnomeBluetooth"
license=('GPL' 'LGPL')
depends=('gtk3' 'hicolor-icon-theme' 'libnotify')
makedepends=('intltool' 'gobject-introspection' 'itstool' 'docbook-xsl')
options=('!libtool' '!emptydirs')
install=gnome-bluetooth.install
source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
        61-gnome-bluetooth-rfkill.rules rfkill.patch)
sha256sums=('70f275922f10ac9f40eb7d57f89193502ee490894b5b721d0f6273432fc97f82'
            '8dd2d3637f380a89e72f65e6c8021e994ccbdc645f1a1b1dbffe74ac9f061f53'
            '99c60802b21899e11de9b3f3c36624d3679297b595b233e5ddb5b89e27963b23')

build() {
  cd $pkgname-$pkgver
  patch -p1 -i ../rfkill.patch 
  ./configure --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --disable-desktop-update \
    --disable-icon-update \
    --disable-schemas-compile
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install

  install -m644 -D ../61-gnome-bluetooth-rfkill.rules \
      "$pkgdir/usr/lib/udev/rules.d//61-gnome-bluetooth-rfkill.rules"
}