# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=gnome-flashback
pkgver=3.40.0
pkgrel=1
pkgdesc='GNOME Flashback session'
arch=('x86_64')
url='https://wiki.gnome.org/Projects/GnomeFlashback'
license=('GPL')
depends=('gnome-bluetooth' 'gnome-panel' 'gnome-session' 'gnome-settings-daemon'
         'gnome-themes-extra' 'libibus' 'libxkbfile' 'metacity')
makedepends=('autoconf-archive' 'intltool' 'python')
optdepends=('gnome-backgrounds: Default background'
            'gnome-control-center: System settings'
            'network-manager-applet: Network management')
source=("https://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz"
        'gnome-flashback.pam')
sha256sums=('e03f33100f1982019c2e59bbdcd664549ec5caa0ef2d99e2c0e1272cea08bb3b'
            '7148b3b1773fa312d6cd14798338cc70cffb6df7504ff1787687edd0363138d2')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/$pkgname \
              --disable-schemas-compile --enable-compile-warnings=minimum
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

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

  # Install pam file for the screensaver
  install -Dm644 ../gnome-flashback.pam "$pkgdir/etc/pam.d/gnome-flashback"
}
