# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-panel
pkgver=3.40.0
pkgrel=1
pkgdesc="Panel of GNOME Flashback"
arch=('x86_64')
url="https://wiki.gnome.org/Projects/GnomePanel"
license=('GPL')
depends=('evolution-data-server' 'gnome-desktop' 'gnome-menus' 'libgdm' 'libwnck3' 'nautilus' 'polkit')
makedepends=('intltool' 'itstool' 'python' 'git' 'gtk-doc' 'yelp-tools' 'autoconf-archive')
optdepends=('alacarte: Main menu editor'
            'gnome-applets: Extra applets for the panel')
_commit=841fe4e32ff97b7725694dc60828048fa187f758  # tags/3.40.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-panel.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgname \
              --disable-schemas-compile --enable-compile-warnings=minimum --enable-gtk-doc

  #https://bugzilla.gnome.org/show_bug.cgi?id=656231
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
}

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