pkgname=gperf
pkgver=3.3
pkgdesc="Perfect hash function generator"
homepage="https://www.gnu.org/software/gperf/"
license=('GPL-3.0-or-later')
sources=("${pkgname}-${pkgver}.tar.gz")
urls=("https://ftp.gnu.org/gnu/${pkgname}/${sources[0]}")
md5sums=("31753b021ea78a21f154bf9eecb8b079")

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

src_build() {
  ./configure --prefix=/usr --docdir=/usr/share/doc/${pkgname}-${pkgver}
  make
}

src_check() {
  make -j1 check
}

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

