pkgname=libgpg-error
pkgver=1.55
pkgdesc="Support library for libgcrypt"
arch=(x86_64)
homepage="https://www.gnupg.org"
license=(LGPL-2.1-or-later
         'BSD-3-Clause OR LGPL-2.1-or-later'
         FSFULLR
         GPL-2.0-or-later)
sources=("${pkgname}-${pkgver}.tar.bz2")
urls=("https://www.gnupg.org/ftp/gcrypt/${pkgname}/${sources[0]}")
md5sums=("0430e56fd67d0751b83fc18b0f56a084")

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

src_build() {
  ./configure --prefix=/usr &&
  make
}

src_check() {
  make check
}

src_install() {
  make DESTDIR="$pkgdir" install
  install -v -m644 -D README ${pkgdir}/usr/share/doc/libgpg-error-1.55/README
}
