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

pkgname=libzapojit
pkgver=0.0.3+14+g2dace3f
pkgrel=2
pkgdesc="GLib/GObject wrapper for the SkyDrive and Hotmail REST APIs"
url="https://wiki.gnome.org/Projects/Zapojit"
arch=(x86_64)
license=(GPL)
depends=(libsoup gnome-online-accounts)
makedepends=(intltool gobject-introspection git gtk-doc autoconf-archive)
_commit=2dace3ffcd9ca60c4adb406cf0e8077cd396f722  # master
source=("git+https://gitlab.gnome.org/GNOME/libzapojit.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 --disable-static --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

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