# $Id: PKGBUILD 128928 2015-03-08 18:24:51Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=gnome-initial-setup
pkgver=3.14.3
pkgrel=1
pkgdesc="Simple, easy, and safe way to prepare a new system"
arch=('i686' 'x86_64')
url="http://www.gnome.org/"
license=('GPL')
depends=('libnm-gtk' 'accountsservice' 'cheese' 'gnome-desktop' 'libgweather'
         'gnome-online-accounts' 'libgdm' 'libpwquality' 'libibus' 'libgnomekbd')
makedepends=('intltool')
optdepends=('gdm: GDM Initial Setup mode'
            'gnome-getting-started-docs: GNOME Welcome Tour')
install=$pkgname.install
source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/3.14/$pkgname-$pkgver.tar.xz)
sha256sums=('11cd0902a4b16c934727d9b1d3b91c3cc030205368ac09f19851cdff2ba40a1e')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgname
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  mkdir -p "$pkgdir/var/lib/gnome-initial-setup"

  # Fix a warning
  chown 102:0 "$pkgdir/usr/share/polkit-1/rules.d"
  chmod 700 "$pkgdir/usr/share/polkit-1/rules.d"
}
