#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer		: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=gdbm
pkgver=1.22
pkgrel=01
pkgdesc='GNU database library'
url="https://www.gnu.org/software/gdbm/gdbm.html"
arch=('x86_64')
depends=('glibc' 'sh')
makedepends=('readline' 'autoconf' 'automake' 'gettext')
provides=('libgdbm_compat.so' 'libgdbm.so')
source=("https://ftp.gnu.org/gnu/gdbm/${pkgname}-${pkgver}.tar.gz"{,.sig})

prepare() {
  cd "$pkgname-$pkgver"
  autoreconf -fiv
}

build() {
  cd "$pkgname-$pkgver"
  ./configure --prefix=/usr \
              --enable-libgdbm-compat
  make
}

check() {
  cd "$pkgname-$pkgver"
  make check
}

package() {
  depends+=('libreadline.so')
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install
  install -vDm 644 {NOTE-WARNING,AUTHORS,NEWS,README,ChangeLog} \
    -t "${pkgdir}/usr/share/doc/${pkgname}"
}

#---- license gpg-key sha256sums ----

license=('GPL3')

validpgpkeys=('325F650C4C2B6AD58807327A3602B07F55D0C732') # Sergey Poznyakoff <gray@gnu.org>

sha256sums=(f366c823a6724af313b6bbe975b2809f9a157e5f6a43612a72949138d161d762 # gdbm-1.22.tar.gz
	0e66b54bc503377c0e13e001c6807f6c908c1cfb51a892446e69ee9400229c3a) #  gdbm-1.22.tar.gz.sig
