# $Id: PKGBUILD 135176 2015-06-11 01:02:38Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=gnome-initial-setup
pkgver=3.16.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' 'python2')
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/${pkgver%.*}/$pkgname-$pkgver.tar.xz)
sha256sums=('9c424fd6ccc9c6e17b6352a39f6a0e8080294978ad15b24e67b53b3714ab1dfa')

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