pkgname=libxslt
pkgver=1.1.43
_basever=1.1
pkgdesc="XML stylesheet transformation library"
homepage="https://gitlab.gnome.org/GNOME/libxslt/-/wikis/home"
arch=(x86_64)
license=(MIT)
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://download.gnome.org/sources/${pkgname}/${_basever}/${sources[0]}")
md5sums=("5dc0179c81be7a3082b43030ecfdebd4")


src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_build() {
  ./configure --prefix=/usr    \
              --disable-static \
              --docdir=/usr/share/doc/libxslt-${pkgver} &&
  make
}

src_check() {
  make check
}

src_install() {
  make DESTDIR="$pkgdir" install

  install -Dm644 Copyright -t "$pkgdir/usr/share/licenses/$pkgname"
}
