# Maintainer: Alexey Pavlov <alexpux@gmail.com>

pkgname=yelp-xsl
pkgver=3.28.0
pkgrel=1
pkgdesc="Stylesheets for Yelp"
arch=('any')
license=('GPL')
url="https://www.gnome.org"
options=('strip' '!libtool' 'staticlibs')
makedepends=("libxml2-python" "libxslt-python" "intltool" "itstool")
source=(https://download.gnome.org/sources/${pkgname}/${pkgver:0:4}/${pkgname}-$pkgver.tar.xz)
sha256sums=('8ccdf47b31acbdd26a7380b3bc6700742a7aff91a54dab279fd5ea8b43b53f93')

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}
  autoreconf -ivf
}

build() {
  mkdir -p ${srcdir}/build-${CHOST} && cd ${srcdir}/build-${CHOST}
  export PYTHON=/usr/bin/python2
  ${srcdir}/${pkgname}-${pkgver}/configure \
    --prefix=/usr \
    --build=${CHOST} \
    --host=${CHOST} \
    --sysconfdir=/etc \
    --localstatedir=/var

  make
}

check() {
  cd ${srcdir}/build-${CHOST}
  make -k check
}

package() {
  cd ${srcdir}/build-${CHOST}
  make DESTDIR="${pkgdir}" install
  mkdir -p ${pkgdir}/usr/lib
  mv ${pkgdir}/usr/share/pkgconfig ${pkgdir}/usr/lib/
}
