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

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

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

build() {
  mkdir -p ${srcdir}/build-${CHOST} && cd ${srcdir}/build-${CHOST}

  ${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/
}
