# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: GordonGR <ntheo1979@gmail.com>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=lib32-rest
pkgver=0.8.1
pkgrel=3
pkgdesc='A helper library for RESTful services'
arch=(x86_64)
url=https://www.gtk.org/
license=(GPL2)
depends=(
  lib32-libsoup
  rest
)
makedepends=(
  git
  gtk-doc
)
_tag=2971b3b92701f70fc368ad64bd25cefaea043f87
source=(git+https://gitlab.gnome.org/GNOME/librest.git#tag=${_tag})
b2sums=(SKIP)

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

pkgver() {
  cd librest
  git describe --tags
}

build() {
  cd librest

  export CC='gcc -m32'
  export CXX='g++ -m32'
  export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'

  ./configure \
    --prefix=/usr \
    --libdir=/usr/lib32 \
    --disable-introspection \
    --disable-gtk-doc
  make
}

package() {
  make DESTDIR="${pkgdir}" -C librest install
  rm -rf "${pkgdir}"/usr/{include,share}
}

# vim: ts=2 sw=2 et:
