pkgname="libunistring"
pkgver="1.3"
pkgdesc='Library for manipulating Unicode strings and C strings'
homepage='https://www.gnu.org/software/libunistring/'
arch=(x86_64)
license=(
  GPL-2.0-or-later
  LGPL-3.0-or-later
  )
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://ftp.gnu.org/gnu/${pkgname}/${sources[0]}")
md5sums=("57dfd9e4eba93913a564aa14eab8052e")

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

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

src_check() {
  make check
}

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