# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=libgnome-games-support
pkgver=1.4.4
pkgrel=1
pkgdesc="Code shared between GNOME games"
url="https://gitlab.gnome.org/GNOME/libgnome-games-support"
arch=(x86_64)
license=(GPL3 LGPL3)
depends=(libgee gtk3)
makedepends=(vala git autoconf-archive)
_commit=a28ffb2d46f2b142717d4709a9e5129a3b80f92e  # tags/1.4.4^0
source=("git+https://gitlab.gnome.org/GNOME/libgnome-games-support.git#commit=$_commit")
sha256sums=('SKIP')

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

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

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

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